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

EISCONN error is raised in FreeBSD to indicate

that connection is already established
parent a9622c9a
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ import time
from errno import EWOULDBLOCK
from errno import ENOBUFS
from errno import EINTR
from errno import EISCONN
from xmpp.idlequeue import IdleObject
MAX_BUFF_LEN = 65536
......@@ -962,7 +963,7 @@ class Socks5Receiver(Socks5, IdleObject):
self.file_props, self.queue_idx)
return None
# win32 needs this
elif errnum != 10056 or self.state != 0:
elif errnum not in (10056, EISCONN) or self.state != 0:
return None
else: # socket is already connected
self._sock.setblocking(False)
......
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