Giampaolo Rodola avatar Giampaolo Rodola committed b3fdd44

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)
........

Comments (0)

Files changed (3)

             self.handle_read()
 
     def handle_connect_event(self):
+        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
-        self.handle_connect()
 
     def handle_write_event(self):
         if self.accepting:
 Peter Еstrand
 Jesse Noller
 Fredrik Hееrd
+Alexander Shigin
 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.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.