mirror of
https://github.com/python/cpython.git
synced 2025-11-10 10:32:04 +00:00
[3.11] gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (GH-104474) (#104485)
(cherry picked from commit fb8739f0b6)
Co-authored-by: Sam Bull <git@sambull.org>
This commit is contained in:
parent
8e79414efc
commit
1afc0a9591
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue