Commit b01eaf53 authored by Denis Bilenko's avatar Denis Bilenko

core.pyx: fix bug in getaddrinfo_request.cancel(); previosly...

core.pyx: fix bug in getaddrinfo_request.cancel(); previosly evdns_getaddrinfo_cancel was not called properly
parent 61e7878f
......@@ -343,9 +343,11 @@ cdef class getaddrinfo_request:
self._ptr = NULL
def _cancel(self):
if self._ptr and self.base is not None:
levent.evdns_getaddrinfo_cancel(self._ptr)
# getaddrinfo_handler will be called immediatelly, with EVUTIL_EAI_CANCEL argument
cdef void* ptr = self._ptr
if ptr:
self._ptr = NULL
# self.base is already None
levent.evdns_getaddrinfo_cancel(ptr)
def cancel(self):
if self._ptr and self.base is not None:
......
Markdown is supported
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