mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-118950: Fix SSLProtocol.connection_lost not being called when OSError is thrown (#118960)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
41bd9d959c
commit
3f24bde0b6
3 changed files with 53 additions and 1 deletions
|
@ -101,7 +101,7 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
|
|||
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 @@ class SSLProtocol(protocols.BufferedProtocol):
|
|||
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