Commit 5e16e844 authored by Alexandre's avatar Alexandre
Browse files

Close handles and remove them from multi

parent 997c6e48
......@@ -530,9 +530,16 @@ class ConnectionDoH(Connection):
if not self.multistreams:
self.curl_handle.close()
else:
# TODO: remove and close handles
self.remove_handles()
self.multi.close()
def remove_handles(self):
n, handle_success, handle_fail = self.multi.info_read()
handles = handle_success + handle_fail
for h in handles:
h.close()
self.multi.remove_handle(h)
def perform(self, request):
request.buffer = io.BytesIO()
self.curl_handle.setopt(pycurl.WRITEDATA, request.buffer)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment