commit | b0d1c37d737742eb098b985475987f460a13a6c2 | [log] [tgz] |
---|---|---|
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | Tue Dec 25 22:46:32 2012 +0000 |
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | Tue Dec 25 22:46:32 2012 +0000 |
tree | d87fcaac580feb5a429ed92a42a77fc1901c6cc5 | |
parent | c08ded9e4a3073e6f6315d0fa462debdb6d28304 [diff] [blame] |
Issue #14574: Ignore socket errors raised when flushing a connection on close.
diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py index 1594321..26611b7 100644 --- a/Lib/SocketServer.py +++ b/Lib/SocketServer.py
@@ -701,7 +701,12 @@ 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()