diff options
| author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-25 22:46:32 (GMT) |
|---|---|---|
| committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-25 22:46:32 (GMT) |
| commit | b0d1c37d737742eb098b985475987f460a13a6c2 (patch) | |
| tree | d87fcaac580feb5a429ed92a42a77fc1901c6cc5 /Lib/SocketServer.py | |
| parent | c08ded9e4a3073e6f6315d0fa462debdb6d28304 (diff) | |
| download | cpython-b0d1c37d737742eb098b985475987f460a13a6c2.zip cpython-b0d1c37d737742eb098b985475987f460a13a6c2.tar.gz cpython-b0d1c37d737742eb098b985475987f460a13a6c2.tar.bz2 | |
Issue #14574: Ignore socket errors raised when flushing a connection on close.
Diffstat (limited to 'Lib/SocketServer.py')
| -rw-r--r-- | Lib/SocketServer.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 @@ 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() |
