Asyncore update
- handle WSAENOTSOCK
This commit is contained in:
parent
a5c1b0c529
commit
97c44b97f4
|
@ -63,6 +63,10 @@ try:
|
||||||
from errno import WSAEWOULDBLOCK
|
from errno import WSAEWOULDBLOCK
|
||||||
except (ImportError, AttributeError):
|
except (ImportError, AttributeError):
|
||||||
WSAEWOULDBLOCK = EWOULDBLOCK
|
WSAEWOULDBLOCK = EWOULDBLOCK
|
||||||
|
try:
|
||||||
|
from errno import WSAENOTSOCK
|
||||||
|
except (ImportError, AttributeError):
|
||||||
|
WSAENOTSOCK = ENOTSOCK
|
||||||
|
|
||||||
from ssl import SSLError, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE
|
from ssl import SSLError, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE
|
||||||
|
|
||||||
|
@ -201,7 +205,7 @@ def select_poller(timeout=0.0, map=None):
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
return
|
return
|
||||||
except socket.error as err:
|
except socket.error as err:
|
||||||
if err.args[0] in (EBADF):
|
if err.args[0] in (EBADF, WSAENOTSOCK):
|
||||||
return
|
return
|
||||||
|
|
||||||
for fd in random.sample(r, len(r)):
|
for fd in random.sample(r, len(r)):
|
||||||
|
|
Reference in New Issue
Block a user