Commit a5566670 authored by Guido van Rossum's avatar Guido van Rossum

Fix for Win2K: add errno.WSAEINVAL to _CONNECT_OK (the possible errno

values that connect_ex() may return when we're connected).  This seems
to resolve the last hangs observed on Win2K.  There are still
(unrelated) hangs on Win98 though.
parent fda3f6e4
...@@ -184,7 +184,8 @@ class ConnectionManager: ...@@ -184,7 +184,8 @@ class ConnectionManager:
# already connected (our code can attempt redundant connects). # already connected (our code can attempt redundant connects).
if hasattr(errno, "WSAEWOULDBLOCK"): # Windows if hasattr(errno, "WSAEWOULDBLOCK"): # Windows
_CONNECT_IN_PROGRESS = (errno.WSAEWOULDBLOCK,) _CONNECT_IN_PROGRESS = (errno.WSAEWOULDBLOCK,)
_CONNECT_OK = (0, errno.WSAEISCONN) # Win98: WSAEISCONN; Win2K: WSAEINVAL
_CONNECT_OK = (0, errno.WSAEISCONN, errno.WSAEINVAL)
else: # Unix else: # Unix
_CONNECT_IN_PROGRESS = (errno.EINPROGRESS,) _CONNECT_IN_PROGRESS = (errno.EINPROGRESS,)
_CONNECT_OK = (0, errno.EISCONN) _CONNECT_OK = (0, errno.EISCONN)
......
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