mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
generally, sockets should be closed after they're used
This commit is contained in:
parent
7b54e7562d
commit
a7cdb0f218
1 changed files with 2 additions and 1 deletions
|
@ -532,13 +532,14 @@ class ForkingMixIn:
|
|||
else:
|
||||
# Child process.
|
||||
# This must never return, hence os._exit()!
|
||||
self.socket.close()
|
||||
try:
|
||||
self.finish_request(request, client_address)
|
||||
self.socket.close()
|
||||
os._exit(0)
|
||||
except:
|
||||
try:
|
||||
self.handle_error(request, client_address)
|
||||
self.socket.close()
|
||||
finally:
|
||||
os._exit(1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue