diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-06-16 22:37:35 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-06-16 22:37:35 +0200 |
commit | f467248d2aec62014ff9ae079a79067afcd9e57a (patch) | |
tree | e6ceb56828e9c96f96a5f35a9707bdfded499bab /src | |
parent | 28dcfa23585c35c70a59c793c0cef5a8ee3a17a1 (diff) | |
download | 0tdns-f467248d2aec62014ff9ae079a79067afcd9e57a.tar.gz 0tdns-f467248d2aec62014ff9ae079a79067afcd9e57a.zip |
close cursor and connection if returning early due to lack of private addresses to use
Diffstat (limited to 'src')
-rwxr-xr-x | src/hourly.py | 4 |
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' |