mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
[3.13] gh-118950: Fix SSLProtocol.connection_lost not being called when OSError is thrown (GH-118960) (#125931)
gh-118950: Fix SSLProtocol.connection_lost not being called when OSError is thrown (GH-118960)
(cherry picked from commit 3f24bde0b6)
Co-authored-by: Javad Shafique <javadshafique@hotmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
f702ea24fa
commit
95bcbcb7c8
3 changed files with 53 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ def get_protocol(self):
|
|||
return self._ssl_protocol._app_protocol
|
||||
|
||||
def is_closing(self):
|
||||
return self._closed
|
||||
return self._closed or self._ssl_protocol._is_transport_closing()
|
||||
|
||||
def close(self):
|
||||
"""Close the transport.
|
||||
|
|
@ -379,6 +379,9 @@ def _get_app_transport(self):
|
|||
self._app_transport_created = True
|
||||
return self._app_transport
|
||||
|
||||
def _is_transport_closing(self):
|
||||
return self._transport is not None and self._transport.is_closing()
|
||||
|
||||
def connection_made(self, transport):
|
||||
"""Called when the low-level connection is made.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue