diff options
-rw-r--r-- | Lib/SocketServer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py index 08f005b..20b8203 100644 --- a/Lib/SocketServer.py +++ b/Lib/SocketServer.py @@ -532,17 +532,19 @@ class ForkingMixIn: if self.active_children is None: self.active_children = [] self.active_children.append(pid) - self.close_request(request) + request.close() #close socket handle in parent process return else: # Child process. # This must never return, hence os._exit()! try: self.finish_request(request, client_address) + self.close_request(request) os._exit(0) except: try: self.handle_error(request, client_address) + self.close_request(request) finally: os._exit(1) |