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

Tom Christie report at bugs.python.org
Tue May 28 10:04:19 EDT 2019


Tom Christie <tom at tomchristie.com> added the comment:

> From my understanding, the correct code should close all transports and wait for their connection_lost() callbacks before closing the loop.

Ideally, yes, although we should be able to expect that an SSL connection that hasn't been gracefully closed wouldn't loudly error on teardown like that.

In standard sync code, the equivelent would running something like this...

```python
session = requests.Session()
session.get('https://example.com/')
```

We wouldn't expect a traceback to be raised on exiting. (Even though the user *hasn't* explicitly closed the session, and even though a keep alive SSL connection will be open at the point of exit.)

----------

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


More information about the Python-bugs-list mailing list