fix issue #2944: asyncore doesn't handle connection refused correctly (patch by Alexander Shigin). Merged from 2.7 branch.
This commit is contained in:
parent
84c7d9f87b
commit
934abddaec
|
@ -435,8 +435,11 @@ class dispatcher:
|
||||||
self.handle_read()
|
self.handle_read()
|
||||||
|
|
||||||
def handle_connect_event(self):
|
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.handle_connect()
|
||||||
|
self.connected = True
|
||||||
|
|
||||||
def handle_write_event(self):
|
def handle_write_event(self):
|
||||||
if self.accepting:
|
if self.accepting:
|
||||||
|
|
|
@ -895,3 +895,4 @@ Siebren van der Zee
|
||||||
Uwe Zessin
|
Uwe Zessin
|
||||||
Tarek Ziadé
|
Tarek Ziadé
|
||||||
Peter Åstrand
|
Peter Åstrand
|
||||||
|
Alexander Shigin
|
||||||
|
|
|
@ -37,6 +37,8 @@ Extensions
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #2944: asyncore doesn't handle connection refused correctly.
|
||||||
|
|
||||||
- Issue #4184: Private attributes on smtpd.SMTPChannel made public and
|
- Issue #4184: Private attributes on smtpd.SMTPChannel made public and
|
||||||
deprecate the private attributes. Add tests for smtpd module.
|
deprecate the private attributes. Add tests for smtpd module.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue