diff options
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-26 15:13:29 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-26 15:13:29 (GMT) |
commit | c8e7e2bb76b7ebd0206e915b1d20b1cf4e6a75e1 (patch) | |
tree | 5946d31e9a93b27c2a729ed560e89837edae3399 /Lib/socketserver.py | |
parent | 00679a7ee0f6fa630c2f709f1d0a761e80181eb7 (diff) | |
parent | 36852b7844fd15fb80a9366ea861c2d5159bb51e (diff) | |
download | cpython-c8e7e2bb76b7ebd0206e915b1d20b1cf4e6a75e1.zip cpython-c8e7e2bb76b7ebd0206e915b1d20b1cf4e6a75e1.tar.gz cpython-c8e7e2bb76b7ebd0206e915b1d20b1cf4e6a75e1.tar.bz2 |
Merge with 3.2 :
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 a21318d..8332fdf 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() |