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 | 36852b7844fd15fb80a9366ea861c2d5159bb51e (patch) | |
tree | eb6889003a2df91bdb2d2320cf5f1caaaa32cc5d /Lib/socketserver.py | |
parent | 303eb478f27720f0e5b6b4147b05f9c15f7fd8f6 (diff) | |
download | cpython-36852b7844fd15fb80a9366ea861c2d5159bb51e.zip cpython-36852b7844fd15fb80a9366ea861c2d5159bb51e.tar.gz cpython-36852b7844fd15fb80a9366ea861c2d5159bb51e.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 adf9f38..8f80a7d 100644 --- a/Lib/socketserver.py +++ b/Lib/socketserver.py @@ -700,7 +700,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() |