summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiampaolo Rodolà <g.rodola@gmail.com>2010-08-04 08:58:38 (GMT)
committerGiampaolo Rodolà <g.rodola@gmail.com>2010-08-04 08:58:38 (GMT)
commit042cf1ae8c7f1ba01901ea448ba74bc6dc23d4fc (patch)
tree4900bb765881033b38c594b5fb022c6ac0190277
parentdba50788a75c8eb85337fe575ca9279713584196 (diff)
downloadcpython-042cf1ae8c7f1ba01901ea448ba74bc6dc23d4fc.zip
cpython-042cf1ae8c7f1ba01901ea448ba74bc6dc23d4fc.tar.gz
cpython-042cf1ae8c7f1ba01901ea448ba74bc6dc23d4fc.tar.bz2
Merged revisions 83703 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint ........ r83703 | giampaolo.rodola | 2010-08-04 10:35:25 +0200 (mer, 04 ago 2010) | 1 line fix issue #2944: asyncore doesn't handle connection refused correctly (patch by Alexander Shigin) ........
-rw-r--r--Lib/asyncore.py5
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS2
3 files changed, 7 insertions, 1 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index d3301b0..16fe43a 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -422,8 +422,11 @@ class dispatcher:
self.handle_read()
def handle_connect_event(self):
- self.connected = True
+ err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
+ if err != 0:
+ raise socket.error(err, _strerror(err))
self.handle_connect()
+ self.connected = True
def handle_write_event(self):
if self.accepting:
diff --git a/Misc/ACKS b/Misc/ACKS
index 757bc1d..d94790e 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -817,3 +817,4 @@ Tarek ZiadŽ
Peter Åstrand
Jesse Noller
Fredrik Håård
+Alexander Shigin
diff --git a/Misc/NEWS b/Misc/NEWS
index ca9d8f7..d6ac5a8 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -89,6 +89,8 @@ C-API
Library
-------
+- Issue #2944: asyncore doesn't handle connection refused correctly.
+
- Issue #8447: Make distutils.sysconfig follow symlinks in the path to
the interpreter executable. This fixes a failure of test_httpservers
on OS X.