Kaydet (Commit) 76fc8c70 authored tarafından Giampaolo Rodolà's avatar Giampaolo Rodolà

fix issue 658749: correctly interprets asyncore's windows errors on connect()

üst 05380645
......@@ -53,7 +53,7 @@ import time
import warnings
import os
from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \
from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED, errorcode
try:
......@@ -337,8 +337,8 @@ class dispatcher:
def connect(self, address):
self.connected = False
err = self.socket.connect_ex(address)
# XXX Should interpret Winsock return values
if err in (EINPROGRESS, EALREADY, EWOULDBLOCK):
if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \
or err == EINVAL and os.name in ('nt', 'ce'):
return
if err in (0, EISCONN):
self.addr = address
......
......@@ -123,6 +123,9 @@ Extensions
Library
-------
- Issue #658749: asyncore's connect() method now correctly interprets winsock
errors;
- Issue #9501: Fixed logging regressions in cleanup code.
- Fix functools.total_ordering() to actually work.
......
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