improve connect to remote host in zeroconf under windows
This commit is contained in:
parent
279b17625e
commit
d5286d8375
|
@ -458,7 +458,10 @@ class P2PConnection(IdleObject, PlugIn):
|
||||||
self._sock.setblocking(False)
|
self._sock.setblocking(False)
|
||||||
except Exception, ee:
|
except Exception, ee:
|
||||||
(errnum, errstr) = ee
|
(errnum, errstr) = ee
|
||||||
if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK):
|
errors = (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK)
|
||||||
|
if 'WSAEINVAL' in errno.__dict__:
|
||||||
|
errors += (errno.WSAEINVAL,)
|
||||||
|
if errnum in errors:
|
||||||
return
|
return
|
||||||
# win32 needs this
|
# win32 needs this
|
||||||
elif errnum not in (0, 10056, errno.EISCONN) or self.state != 0:
|
elif errnum not in (0, 10056, errno.EISCONN) or self.state != 0:
|
||||||
|
|
Loading…
Reference in New Issue