From e94cace39b39b6e509d96d1b5c67c68b88853529 Mon Sep 17 00:00:00 2001 From: zhenthebuilder Date: Mon, 22 Apr 2024 22:03:48 -0700 Subject: [PATCH] Remove all the calls to websocket.state --- replit_river/client_transport.py | 4 +--- replit_river/server.py | 1 - replit_river/session.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/replit_river/client_transport.py b/replit_river/client_transport.py index 2f9876f..2e022bb 100644 --- a/replit_river/client_transport.py +++ b/replit_river/client_transport.py @@ -219,9 +219,7 @@ async def _establish_handshake( logging.debug("river client waiting for handshake response") while True: try: - logging.debug( - f"websocket while waiting for response : {websocket.id} {websocket.state}" - ) + logging.debug(f"websocket while waiting for response : {websocket.id}") data = await websocket.recv() except ConnectionClosed: logging.debug( diff --git a/replit_river/server.py b/replit_river/server.py index eef3367..647ef92 100644 --- a/replit_river/server.py +++ b/replit_river/server.py @@ -36,7 +36,6 @@ def add_rpc_handlers( async def serve(self, websocket: WebSocketServerProtocol) -> None: logging.debug( f"River server started establishing session with ws: {websocket.id}" - f" {websocket.state}" ) try: session = await self._transport.handshake_to_get_session(websocket) diff --git a/replit_river/session.py b/replit_river/session.py index 7d9caea..a7fd100 100644 --- a/replit_river/session.py +++ b/replit_river/session.py @@ -162,7 +162,7 @@ async def _handle_messages_from_ws( ) -> None: logging.debug( f'{"server" if self._is_server else "client"} start handling messages from' - f" ws {websocket.id}, state {websocket.state}" + f" ws {websocket.id}" ) try: async for message in websocket: