diff options
author | Sam Bull <git@sambull.org> | 2023-05-14 18:58:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 18:58:13 (GMT) |
commit | fb8739f0b6291fb048a94d6312f59ba4d10a20ca (patch) | |
tree | 3c62c4831356e09922d409663ce914d770f1091e /Lib | |
parent | 88c5c586708dcff369c49edae947d487a80f0346 (diff) | |
download | cpython-fb8739f0b6291fb048a94d6312f59ba4d10a20ca.zip cpython-fb8739f0b6291fb048a94d6312f59ba4d10a20ca.tar.gz cpython-fb8739f0b6291fb048a94d6312f59ba4d10a20ca.tar.bz2 |
gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (#104474)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncio/sslproto.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index bbf9cad..488e17d 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -244,7 +244,8 @@ class _SSLProtocolTransport(transports._FlowControlMixin, 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 |