Skip to content

Commit fb8739f

Browse files
gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (#104474)
1 parent 88c5c58 commit fb8739f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/asyncio/sslproto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ def abort(self):
244244
called with None as its argument.
245245
"""
246246
self._closed = True
247-
self._ssl_protocol._abort()
247+
if self._ssl_protocol is not None:
248+
self._ssl_protocol._abort()
248249

249250
def _force_close(self, exc):
250251
self._closed = True

0 commit comments

Comments
 (0)