From 30fd49f44b5e6edeff5fa45e569e91b8ad1a5841 Mon Sep 17 00:00:00 2001 From: Sergey Shepelev Date: Thu, 8 Aug 2013 18:46:38 +0400 Subject: [PATCH] wsgi: close timed out client connections --- eventlet/wsgi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eventlet/wsgi.py b/eventlet/wsgi.py index 5c5b67a..0ed4d12 100644 --- a/eventlet/wsgi.py +++ b/eventlet/wsgi.py @@ -585,6 +585,7 @@ class Server(BaseHTTPServer.HTTPServer): proto.__init__(sock, address, self) except socket.timeout: # Expected exceptions are not exceptional + sock.close() if self.debug: # similar to logging "accepted" in server() self.log_message('(%s) timed out %r' % (self.pid, address))