diff options
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-26 15:15:17 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-26 15:15:17 (GMT) |
commit | cacb400345f5ccf575151647367816c3b09fde4e (patch) | |
tree | e844fa774d74f57c77a25a0599c4e42bbdc7c618 /Lib/socketserver.py | |
parent | ae57cec791214b5609ad66f6c7a6e10ce3985911 (diff) | |
parent | c8e7e2bb76b7ebd0206e915b1d20b1cf4e6a75e1 (diff) | |
download | cpython-cacb400345f5ccf575151647367816c3b09fde4e.zip cpython-cacb400345f5ccf575151647367816c3b09fde4e.tar.gz cpython-cacb400345f5ccf575151647367816c3b09fde4e.tar.bz2 |
Merge with 3.3
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 abc4f02..e9e4e4e 100644 --- a/Lib/socketserver.py +++ b/Lib/socketserver.py @@ -718,7 +718,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() |