mirror of
https://github.com/python/cpython.git
synced 2025-08-10 20:08:47 +00:00
fix issue #2944: asyncore doesn't handle connection refused correctly (patch by Alexander Shigin)
This commit is contained in:
parent
0b5019fe23
commit
47617ab20d
3 changed files with 7 additions and 1 deletions
|
@ -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:
|
||||||
|
|
|
@ -871,3 +871,4 @@ Uwe Zessin
|
||||||
Tarek Ziadé
|
Tarek Ziadé
|
||||||
Peter Åstrand
|
Peter Åstrand
|
||||||
Andrej Krpic
|
Andrej Krpic
|
||||||
|
Alexander Shigin
|
||||||
|
|
|
@ -24,6 +24,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #2944: asyncore doesn't handle connection refused correctly.
|
||||||
|
|
||||||
- Issue #3196: email header decoding is now forgiving if an RFC2047
|
- Issue #3196: email header decoding is now forgiving if an RFC2047
|
||||||
encoded word encoded in base64 is lacking padding.
|
encoded word encoded in base64 is lacking padding.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue