[issue25566] asyncio reference cycles after ConnectionResetError

Jeroen van der Heijden report at bugs.python.org
Fri Nov 6 06:43:35 EST 2015


New submission from Jeroen van der Heijden:

When a ConnectionResetError occurs, reference cycles are created due to __traceback__. As far as I can see there's no way to prevent this to happen since the event loop exception handler is not called for the following events: BrokenPipeError, ConnectionResetError and ConnectionAbortedError. (selector_events.py, line 579)

In this case the connection is probably lost so '_protocol.connection_lost()' will not be called either. (at least we can't rely on this)

Maybe it's possible to just call the exception handler? Or, in case we want to ignore these errors set __traceback__ to None?

----------
components: asyncio
messages: 254184
nosy: gvanrossum, haypo, joente, yselivanov
priority: normal
severity: normal
status: open
title: asyncio reference cycles after ConnectionResetError
type: resource usage
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25566>
_______________________________________


More information about the Python-bugs-list mailing list