]> granicus.if.org Git - python/commitdiff
Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr.
authorGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 20 Mar 2012 15:44:24 +0000 (16:44 +0100)
committerGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 20 Mar 2012 15:44:24 +0000 (16:44 +0100)
Lib/asyncore.py
Misc/NEWS

index 920444d89abc4d1971e00bf99f8b116789daaee6..d20609d36164e5dfb5a76e29686685d3c625780c 100644 (file)
@@ -337,6 +337,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 f03aeb5c1a5c7898b2de898e8d8e1dbd0e9b1381..69388ca314bcf2bbfdd05718360868e629ef470c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr
+  attribute.
+
 - Issue #14344: fixed the repr of email.policy objects.
 
 - Issue #11686: Added missing entries to email package __all__ lists