From 96b782139e3105abf6f7c58795072dabcffc47e7 Mon Sep 17 00:00:00 2001 From: igor udot Date: Sat, 9 Dec 2023 21:23:02 +0300 Subject: [PATCH] fix: typo websocket --- core/cat/routes/websocket.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/cat/routes/websocket.py b/core/cat/routes/websocket.py index e6c26a23d..b0aa105b9 100644 --- a/core/cat/routes/websocket.py +++ b/core/cat/routes/websocket.py @@ -10,21 +10,21 @@ router = APIRouter() -async def receive_message(websoket: WebSocket, stray: StrayCat): +async def receive_message(websocket: WebSocket, stray: StrayCat): """ Continuously receive messages from the WebSocket and forward them to the `ccat` object for processing. """ while True: # Receive the next message from the WebSocket. - user_message = await websoket.receive_json() + user_message = await websocket.receive_json() user_message["user_id"] = stray.user_id # Run the `ccat` object's method in a threadpool since it might be a CPU-bound operation. cat_message = await run_in_threadpool(stray, user_message) # Send the response message back to the user. - await websoket.send_json(cat_message) + await websocket.send_json(cat_message) async def check_messages(websoket: WebSocket, stray: StrayCat):