From b42bd75a25d298b5c066b88e06973b0bdf7b2a3a Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Mon, 27 Mar 2006 15:28:29 +0000 Subject: [PATCH] EISCONN error is raised in FreeBSD to indicate that connection is already established --- src/common/socks5.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/socks5.py b/src/common/socks5.py index 4782df605..33025dacd 100644 --- a/src/common/socks5.py +++ b/src/common/socks5.py @@ -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)