[Python-checkins] cpython: Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr.

giampaolo.rodola python-checkins at python.org
Tue Mar 20 16:44:36 CET 2012


http://hg.python.org/cpython/rev/1c0058991740
changeset:   75839:1c0058991740
parent:      75836:0741add59487
user:        Giampaolo Rodola' <g.rodola at gmail.com>
date:        Tue Mar 20 16:44:24 2012 +0100
summary:
  Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr.

files:
  Lib/asyncore.py |  1 +
  Misc/NEWS       |  3 +++
  2 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Lib/asyncore.py b/Lib/asyncore.py
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -337,6 +337,7 @@
         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
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,9 @@
 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list