Commit 504e84bb authored by Denis Bilenko's avatar Denis Bilenko

pywsgi: ignore errors that happen when socket is closed (for example if it was...

pywsgi: ignore errors that happen when socket is closed (for example if it was  already closed by websocket handler)
parent 2130ea23
......@@ -173,8 +173,11 @@ class WSGIHandler(object):
self.log_request()
break
finally:
try:
self.socket._sock.close() # do not rely on garbage collection
self.socket.close()
except socket.error:
pass
self.__dict__.pop('socket', None)
self.__dict__.pop('rfile', None)
self.__dict__.pop('wfile', None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment