[Python-checkins] r73845 - python/branches/py3k/Lib/socketserver.py

kristjan.jonsson python-checkins at python.org
Sat Jul 4 17:18:01 CEST 2009


Author: kristjan.jonsson
Date: Sat Jul  4 17:18:00 2009
New Revision: 73845

Log:
http://bugs.python.org/issue6381
merging revision 73819 from trunk

Modified:
   python/branches/py3k/Lib/socketserver.py

Modified: python/branches/py3k/Lib/socketserver.py
==============================================================================
--- python/branches/py3k/Lib/socketserver.py	(original)
+++ python/branches/py3k/Lib/socketserver.py	Sat Jul  4 17:18:00 2009
@@ -445,7 +445,12 @@
 
     def close_request(self, request):
         """Called to clean up an individual request."""
-        request.shutdown(socket.SHUT_WR)
+        try:
+            #explicitly shutdown.  socket.close() merely releases
+            #the socket and waits for GC to perform the actual close.
+            request.shutdown(socket.SHUT_WR)
+        except socket.error:
+            pass #some platforms may raise ENOTCONN here
         request.close()
 
 


More information about the Python-checkins mailing list