Commit d4314b31 authored by Denis Bilenko's avatar Denis Bilenko

socket: also cancel _connect_event in shutdown()

parent 1d9391cb
......@@ -541,6 +541,8 @@ class socket(object):
else:
self.hub.cancel_wait(self._read_event, cancel_wait_ex)
self.hub.cancel_wait(self._write_event, cancel_wait_ex)
if self._connect_event is not self._write_event:
self.hub.cancel_wait(self._connect_event, cancel_wait_ex)
self._sock.shutdown(how)
family = property(lambda self: self._sock.family, doc="the socket family")
......
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