Issue 25566: asyncio reference cycles after ConnectionResetError (original) (raw)
Issue25566
Created on 2015-11-06 11:43 by joente, last changed 2022-04-11 14:58 by admin.
Messages (3) | ||
---|---|---|
msg254184 - (view) | Author: Jeroen van der Heijden (joente) * | Date: 2015-11-06 11:43 |
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? | ||
msg266687 - (view) | Author: Sean Hunt (Sean Hunt) | Date: 2016-05-30 10:46 |
I am 1 of those people who want to handle the error with reconnect code as it happens when using discord.py when the stupid connection is aborted due to Cloudflare being stupid and them thinking a bot made in python is a DDoS like litterally. So, I know of this error as well. | ||
msg266708 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2016-05-30 16:42 |
Please submit a patch to the upstream asyncio repo, github.com/Python/asyncio. --Guido (mobile) On May 30, 2016 3:46 AM, "Sean Hunt" <report@bugs.python.org> wrote: > > Sean Hunt added the comment: > > I am 1 of those people who want to handle the error with reconnect code as > it happens when using discord.py when the stupid connection is aborted due > to Cloudflare being stupid and them thinking a bot made in python is a DDoS > like litterally. So, I know of this error as well. > > ---------- > nosy: +Sean Hunt > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue25566> > _______________________________________ > |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:23 | admin | set | github: 69752 |
2016-05-30 16:42:20 | gvanrossum | set | messages: + |
2016-05-30 10:46:27 | Sean Hunt | set | nosy: + Sean Huntmessages: + |
2015-11-06 11:43:35 | joente | create |