File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -480,6 +480,7 @@ def connection_lost(self, exc):
480
480
self ._loop .call_soon (self ._app_protocol .connection_lost , exc )
481
481
self ._transport = None
482
482
self ._app_transport = None
483
+ self ._wakeup_waiter (exc )
483
484
484
485
def pause_writing (self ):
485
486
"""Called when the low-level transport's buffer goes over
Original file line number Diff line number Diff line change @@ -85,5 +85,15 @@ def test_fatal_error_no_name_error(self):
85
85
# Restore error logging.
86
86
log .logger .setLevel (log_level )
87
87
88
+ def test_connection_lost (self ):
89
+ # From issue #472.
90
+ # yield from waiter hang if lost_connection was called.
91
+ waiter = asyncio .Future (loop = self .loop )
92
+ ssl_proto = self .ssl_protocol (waiter )
93
+ self .connection_made (ssl_proto )
94
+ ssl_proto .connection_lost (ConnectionAbortedError )
95
+ test_utils .run_briefly (self .loop )
96
+ self .assertIsInstance (waiter .exception (), ConnectionAbortedError )
97
+
88
98
if __name__ == '__main__' :
89
99
unittest .main ()
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ Core and Builtins
14
14
must not convert combined table into split table. Patch written by INADA
15
15
Naoki.
16
16
17
+ - Issue #28990: Fix SSL hanging if connection is closed before handshake
18
+ completed.
19
+ (Patch by HoHo-Ho)
20
+
17
21
Windows
18
22
-------
19
23
You can’t perform that action at this time.
0 commit comments