Skip to content
Snippets Groups Projects
Commit a9622c9a authored by dkirov's avatar dkirov
Browse files

EISCONN shows that connection is already

established
parent b7edb820
No related branches found
No related tags found
No related merge requests found
......@@ -218,6 +218,8 @@ def _do_receive(self):
self.disconnect()
if self.on_connect_failure:
self.on_connect_failure()
# don't proccess result, cas it will raise error
return
elif not received :
if errnum != socket.SSL_ERROR_EOF:
# 8 EOF occurred in violation of protocol
......@@ -292,7 +294,7 @@ def _do_connect(self):
return
# 10056 - already connected, only on win32
# code 'WS*' is not available on GNU, so we use its numeric value
elif errnum not in (0, 10056):
elif errnum not in (0, 10056, errno.EISCONN):
self.remove_timeout()
if self.on_connect_failure:
self.on_connect_failure()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment