mirror of
https://github.com/python/cpython
synced 2024-09-06 04:43:40 +00:00
gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (#104474)
This commit is contained in:
parent
88c5c58670
commit
fb8739f0b6
|
@ -244,7 +244,8 @@ def abort(self):
|
|||
called with None as its argument.
|
||||
"""
|
||||
self._closed = True
|
||||
self._ssl_protocol._abort()
|
||||
if self._ssl_protocol is not None:
|
||||
self._ssl_protocol._abort()
|
||||
|
||||
def _force_close(self, exc):
|
||||
self._closed = True
|
||||
|
|
Loading…
Reference in a new issue