Commit 14805ba7 authored by Alexandre's avatar Alexandre
Browse files

Catch error on curl perform

parent a4a95090
......@@ -460,7 +460,10 @@ class ConnectionDoH(Connection):
def perform(self):
self.buffer = io.BytesIO()
self.set_opt(pycurl.WRITEDATA, self.buffer)
self.curl.perform()
try:
self.curl.perform()
except pycurl.error as e:
error(e.args[1])
def receive(self, request):
body = self.buffer.getvalue()
......
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