summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorGiampaolo RodolĂ  <g.rodola@gmail.com>2010-08-23 21:56:11 (GMT)
committerGiampaolo RodolĂ  <g.rodola@gmail.com>2010-08-23 21:56:11 (GMT)
commit3fac43f89fb08487dc48fffa791d1c205d9710c5 (patch)
treeceecb01e7fc5a15e1ed69927ae91c4f9fffc2409 /Lib/asyncore.py
parentff6d5c044a017364f291dc792b500dba8f7e55f0 (diff)
downloadcpython-3fac43f89fb08487dc48fffa791d1c205d9710c5.zip
cpython-3fac43f89fb08487dc48fffa791d1c205d9710c5.tar.gz
cpython-3fac43f89fb08487dc48fffa791d1c205d9710c5.tar.bz2
Merged revisions 84284 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84284 | giampaolo.rodola | 2010-08-23 23:53:41 +0200 (lun, 23 ago 2010) | 1 line fix issue 658749: correctly interprets asyncore's windows errors on connect() ........
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 7b922a9..7f06e43 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -51,7 +51,7 @@ import socket
import sys
import time
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:
@@ -333,8 +333,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