diff --git a/sanic/app.py b/sanic/app.py index b79d16e4..70d7b0b5 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -992,10 +992,10 @@ class Sanic(BaseSanic, RunnerMixin, metaclass=TouchUpMeta): cancelled = False try: await fut - except Exception as e: - self.error_handler.log(request, e) except (CancelledError, ConnectionClosed): cancelled = True + except Exception as e: + self.error_handler.log(request, e) finally: self.websocket_tasks.remove(fut) if cancelled: