Skip to content

Commit

Permalink
Asyncore update
Browse files Browse the repository at this point in the history
- handle WSAENOTSOCK
  • Loading branch information
PeterSurda committed May 29, 2017
1 parent a5c1b0c commit 97c44b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/network/asyncore_pollchoose.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
from errno import WSAEWOULDBLOCK
except (ImportError, AttributeError):
WSAEWOULDBLOCK = EWOULDBLOCK
try:
from errno import WSAENOTSOCK
except (ImportError, AttributeError):
WSAENOTSOCK = ENOTSOCK

from ssl import SSLError, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE

Expand Down Expand Up @@ -201,7 +205,7 @@ def select_poller(timeout=0.0, map=None):
except KeyboardInterrupt:
return
except socket.error as err:
if err.args[0] in (EBADF):
if err.args[0] in (EBADF, WSAENOTSOCK):
return

for fd in random.sample(r, len(r)):
Expand Down

0 comments on commit 97c44b9

Please sign in to comment.