Skip to content

Commit 8c63cb9

Browse files
Birger SchachtSebastian Wagner
authored andcommitted
BUG: Close the request session after its use
This is mostly to get rid of a Python ResourceWarning about an unclosed ssl socket, but it is also more clean. In the future this should probably be move to a teardown() function.
1 parent adb69d5 commit 8c63cb9

File tree

1 file changed

+1
-0
lines changed
  • intelmq/bots/experts/national_cert_contact_certat

1 file changed

+1
-0
lines changed

intelmq/bots/experts/national_cert_contact_certat/expert.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def process(self):
5151
'sep': 'semicolon',
5252
}
5353
req = self.session.get(URL, params=parameters)
54+
self.session.close()
5455
if not req.text:
5556
# empty response
5657
continue

0 commit comments

Comments
 (0)