diff options
Diffstat (limited to 'Lib/wsgiref/handlers.py')
-rw-r--r-- | Lib/wsgiref/handlers.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/wsgiref/handlers.py b/Lib/wsgiref/handlers.py index 28ed9b7a6d..834073d500 100644 --- a/Lib/wsgiref/handlers.py +++ b/Lib/wsgiref/handlers.py @@ -136,6 +136,10 @@ class BaseHandler: self.setup_environ() self.result = application(self.environ, self.start_response) self.finish_response() + except (ConnectionAbortedError, BrokenPipeError, ConnectionResetError): + # We expect the client to close the connection abruptly from time + # to time. + return except: try: self.handle_error() |