Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr.
authorGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 20 Mar 2012 15:49:55 +0000 (16:49 +0100)
committerGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 20 Mar 2012 15:49:55 +0000 (16:49 +0100)
Lib/asyncore.py
Misc/NEWS

index 7f42d39f331b261d7f2ba95bccef67445c3cc873..ccfc9802c62b50bf1889f2997f765620532cc57b 100644 (file)
@@ -345,6 +345,7 @@ class dispatcher:
         err = self.socket.connect_ex(address)
         if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \
         or err == EINVAL and os.name in ('nt', 'ce'):
+            self.addr = address
             return
         if err in (0, EISCONN):
             self.addr = address
index 40b17fc87f6bd457ee6661e31161a81b4e21e525..3375decccdfee5e89f280293c643c689b26e7aac 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -28,6 +28,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr
+  attribute.
+
 - Issue #11686: Added missing entries to email package __all__ lists
   (mostly the new Bytes classes).