[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

Yury Selivanov report at bugs.python.org
Thu May 30 10:42:53 EDT 2019


Yury Selivanov <yselivanov at gmail.com> added the comment:

> Sorry, that's how asyncio is designed.

Andrew, couldn't we provide a "stream.terminate()" method (not a coroutine) that would do the following:

* close the transport
* set a flag in the protocol that the stream has been terminated.  When the flag is set, the protocol simply ignores all errors (i.e. they are never shown to the user or logged)

This way Tom could have a weakref to the stream object from his high-level wrapper, and whenever the wrapper object is dereferenced it could terminate its stream.

> Sorry, that's how asyncio is designed.

I think it's a real problem, let's try to find out if we can provide a solution.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36709>
_______________________________________


More information about the Python-bugs-list mailing list