summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 fba55e0..874f101 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -435,8 +435,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 75c3ae7..bb00e0f 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -895,3 +895,4 @@ Siebren van der Zee
Uwe Zessin
Tarek Ziadé
Peter Ã…strand
+Alexander Shigin
diff --git a/Misc/NEWS b/Misc/NEWS
index fcd450b..f051eb4 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@ Extensions
Library
-------
+- Issue #2944: asyncore doesn't handle connection refused correctly.
+
- Issue #4184: Private attributes on smtpd.SMTPChannel made public and
deprecate the private attributes. Add tests for smtpd module.