Skip to content

Commit bb3e1f9

Browse files
committed
closing connections if no targets are present
1 parent 9b09bc9 commit bb3e1f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nettacker/database/db.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,8 @@ def last_host_logs(page):
640640
targets = cursor.fetchall()
641641

642642
if not targets:
643+
cursor.close()
644+
connection.close()
643645
return structure(status="finished", msg="No more search results")
644646

645647
hosts = []

0 commit comments

Comments
 (0)