Commit 017acc00 authored by Guido van Rossum's avatar Guido van Rossum

Andy Dustman writes:

I noticed while watching (with lsof) my forking SocketServer app running
that I would get multiple processes listening to the socket. For the most
part, this doesn't hurt things, but if you terminate the server, this can
prevent it from restarting because it cannot bind to the port due to any
running children which also have the socket open. The following one-liner
fixes this.
parent 18ba25af
......@@ -304,6 +304,7 @@ class ForkingMixIn:
os._exit(0)
except:
try:
self.socket.close()
self.handle_error(request,
client_address)
finally:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment