mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merge with 3.2 :
Issue #14574: Ignore socket errors raised when flushing a connection on close.
This commit is contained in:
commit
c8e7e2bb76
2 changed files with 8 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue