Closed xloem closed 7 months ago
asyncio
transports allow calling transport.close()
more than once: https://github.com/python/cpython/blob/c163d7f0b67a568e9b64eeb9c1cbbaa127818596/Lib/asyncio/sslproto.py#L110-L114
I vaguely recall, if you check the section you hilighted, a second call to close() resets a member variable to None, causing other member functions to crash, whereas a single call does not do this. edit: https://github.com/python/cpython/blob/c163d7f0b67a568e9b64eeb9c1cbbaa127818596/Lib/asyncio/sslproto.py#L113-L114
Related to #185. Fix was implemented in other place.
This addresses a crash I’ve been encountering with ssl on python 3.11 when the connection aborts unexpectedly.