aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-06-16 22:37:35 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-06-16 22:37:35 +0200
commitf467248d2aec62014ff9ae079a79067afcd9e57a (patch)
treee6ceb56828e9c96f96a5f35a9707bdfded499bab
parent28dcfa23585c35c70a59c793c0cef5a8ee3a17a1 (diff)
download0tdns-f467248d2aec62014ff9ae079a79067afcd9e57a.tar.gz
0tdns-f467248d2aec62014ff9ae079a79067afcd9e57a.zip
close cursor and connection if returning early due to lack of private addresses to use
-rwxr-xr-xsrc/hourly.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hourly.py b/src/hourly.py
index 95680a5..9563f74 100755
--- a/src/hourly.py
+++ b/src/hourly.py
@@ -162,7 +162,9 @@ def do_hourly_work(hour):
if not subnets:
log("couldn't get ANY /30 subnet of private"
" addresses from the 0tdns config file - exiting");
- return # TODO close cursor and connection here
+ cursor.close()
+ connection.close()
+ return
if len(subnets) < parallel_vpns:
log('configuration allows running {0} parallel vpn connections, but'