[issue1429] FD leak in SocketServer

Jeff McNeil report at bugs.python.org
Mon May 3 06:17:26 CEST 2010


Jeff McNeil <jeff at jmcneil.net> added the comment:

I was toying with adding Unix Socket support for one of our internal tools and I thought I ran into a leak in my own code. Searched the bug tracker and found this.

I tried to reproduce, but wasn't able to. Though, if you look at the ThreadingMixIn class, you'll see this:

self.handle_error(request, client_address)
self.close_request(request)

An exception in handle_error, most likely from a subclass, would cause close_request to never fire. Though, the socket.accept'd channel would probably be shut down implicitly when leaving _handle_request_nonblock.

----------
nosy: +mcjeff

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


More information about the Python-bugs-list mailing list