File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,8 +299,8 @@ request.
299299.. method :: RequestHandler.finish()
300300
301301 Called after the :meth: `handle ` method to perform any clean-up actions
302- required. The default implementation does nothing. If :meth: `setup ` or
303- :meth: ` handle ` raise an exception, this function will not be called.
302+ required. The default implementation does nothing. If :meth: `setup `
303+ raises an exception, this function will not be called.
304304
305305
306306.. method :: RequestHandler.handle()
Original file line number Diff line number Diff line change @@ -700,7 +700,12 @@ def setup(self):
700700
701701 def finish (self ):
702702 if not self .wfile .closed :
703- self .wfile .flush ()
703+ try :
704+ self .wfile .flush ()
705+ except socket .error :
706+ # An final socket error may have occurred here, such as
707+ # the local error ECONNABORTED.
708+ pass
704709 self .wfile .close ()
705710 self .rfile .close ()
706711
You can’t perform that action at this time.
0 commit comments