Fix bug where ws exceptions not being logged (#2213)

* Fix bug where ws exceptions not being logged

* Fix t\est
This commit is contained in:
Adam Hopkins
2021-08-07 23:24:48 +03:00
committed by GitHub
parent 71a631237d
commit 8dbda247d6
4 changed files with 27 additions and 12 deletions

View File

@@ -893,6 +893,8 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta):
self.websocket_tasks.add(fut)
try:
await fut
except Exception as e:
self.error_handler.log(request, e)
except (CancelledError, ConnectionClosed):
pass
finally: