Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1afc0a9

Browse filesBrowse files
[3.11] gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (GH-104474) (#104485)
(cherry picked from commit fb8739f) Co-authored-by: Sam Bull <git@sambull.org>
1 parent 8e79414 commit 1afc0a9
Copy full SHA for 1afc0a9

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎Lib/asyncio/sslproto.py

Copy file name to clipboardExpand all lines: Lib/asyncio/sslproto.py
+2-1Lines changed: 2 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.