]> granicus.if.org Git - python/commitdiff
merge 3.1
authorBenjamin Peterson <benjamin@python.org>
Tue, 24 May 2011 17:09:26 +0000 (12:09 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 24 May 2011 17:09:26 +0000 (12:09 -0500)
1  2 
Lib/socketserver.py

index f42802c27a9074ed9f152624993a88add22eae70,c53ac2971f00154a396f812c8559a2717b095244..1103f4bfe81e4726b810ca85756694e2424041f8
@@@ -552,15 -532,14 +552,16 @@@ class ForkingMixIn
          else:
              # Child process.
              # This must never return, hence os._exit()!
-             self.socket.close()
              try:
                  self.finish_request(request, client_address)
 +                self.shutdown_request(request)
+                 self.socket.close()
                  os._exit(0)
              except:
                  try:
                      self.handle_error(request, client_address)
 +                    self.shutdown_request(request)
+                     self.socket.close()
                  finally:
                      os._exit(1)