Message306368
> It's worse than a resource leak - the same file descriptor number could be reused for a different file/socket, and then depending on the selector in use, you could see the data from a completely different connection.
I actually debugged a bug like this in asyncio code once. Took me quite a bit of time to figure it out.
> I did see a bug like this years ago (in libcurl), although it's not a common problem. I'd use the proposed hook if it existed, but it seems like an intrusive solution to a rare issue.
I don't think the proposed solution is too intrusive. If we don't like the "set a callback to intercept all socket.close()" idea, we can change it to: "add socket.add_close_callback() method to the socket object." |
|
Date |
User |
Action |
Args |
2017-11-16 16:18:01 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, pitrou, asvetlov, Ben.Darnell |
2017-11-16 16:18:01 | yselivanov | set | messageid: <1510849081.34.0.213398074469.issue32038@psf.upfronthosting.co.za> |
2017-11-16 16:18:01 | yselivanov | link | issue32038 messages |
2017-11-16 16:18:01 | yselivanov | create | |
|