mirror of https://github.com/python/cpython
gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (#104474)
This commit is contained in:
parent
88c5c58670
commit
fb8739f0b6
|
@ -244,7 +244,8 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
|
||||||
called with None as its argument.
|
called with None as its argument.
|
||||||
"""
|
"""
|
||||||
self._closed = True
|
self._closed = True
|
||||||
self._ssl_protocol._abort()
|
if self._ssl_protocol is not None:
|
||||||
|
self._ssl_protocol._abort()
|
||||||
|
|
||||||
def _force_close(self, exc):
|
def _force_close(self, exc):
|
||||||
self._closed = True
|
self._closed = True
|
||||||
|
|
Loading…
Reference in New Issue