merging revision 73819 from trunk
This commit is contained in:
Kristján Valur Jónsson 2009-07-04 15:18:00 +00:00
parent b8e138aa23
commit 200cfd00ab
1 changed files with 6 additions and 1 deletions

View File

@ -445,7 +445,12 @@ class TCPServer(BaseServer):
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()