From 1a60647e68b7d39066d748696d0a03da2624a83d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 06:28:30 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- daphne/ws_protocol.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daphne/ws_protocol.py b/daphne/ws_protocol.py index e8de06f..912c9a6 100755 --- a/daphne/ws_protocol.py +++ b/daphne/ws_protocol.py @@ -279,13 +279,18 @@ class WebSocketProtocol(WebSocketServerProtocol): self.duration() > self.server.websocket_timeout and self.server.websocket_timeout >= 0 ): - logger.warning("WebSocket %s took too long and was killed.", self.client_addr) + logger.warning( + "WebSocket %s took too long and was killed.", self.client_addr + ) self.serverClose() # Ping check # If we're still connecting, deny the connection if self.state == self.STATE_CONNECTING: if self.duration() > self.server.websocket_connect_timeout: - logger.warning("WebSocket %s connection took too long and was killed.", self.client_addr) + logger.warning( + "WebSocket %s connection took too long and was killed.", + self.client_addr, + ) self.serverReject() elif self.state == self.STATE_OPEN: if (time.time() - self.last_ping) > self.server.ping_interval: