We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f97c3c commit 7497554Copy full SHA for 7497554
1 file changed
sanic/server/websockets/impl.py
@@ -425,7 +425,13 @@ async def auto_close_connection(self) -> None:
425
return
426
except asyncio.CancelledError:
427
...
428
+ except BaseException:
429
+ websockets_logger.exception("Error closing websocket connection")
430
finally:
431
+ # Does this still exist?
432
+ if self.keepalive_ping_task:
433
+ self.keepalive_ping_task.cancel()
434
+ self.keepalive_ping_task = None
435
# The try/finally ensures that the transport never remains open,
436
# even if this coroutine is cancelled (for example).
437
if (not self.io_proto) or (not self.io_proto.transport):
0 commit comments