Skip to content

Commit

Permalink
Remove all the calls to websocket.state
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenthebuilder committed Apr 23, 2024
1 parent 0294ed2 commit e94cace
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions replit_river/client_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion replit_river/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion replit_river/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e94cace

Please sign in to comment.