Issue #14574: Ignore socket errors raised when flushing a connection on close.

This commit is contained in:
Kristján Valur Jónsson 2012-12-25 22:46:32 +00:00
parent c08ded9e4a
commit b0d1c37d73
2 changed files with 8 additions and 3 deletions

View file

@ -701,7 +701,12 @@ class StreamRequestHandler(BaseRequestHandler):
def finish(self):
if not self.wfile.closed:
self.wfile.flush()
try:
self.wfile.flush()
except socket.error:
# An final socket error may have occurred here, such as
# the local error ECONNABORTED.
pass
self.wfile.close()
self.rfile.close()