diff --git a/skt.py b/skt.py index 0355e8d..f538c00 100644 --- a/skt.py +++ b/skt.py @@ -122,7 +122,6 @@ user_msg = {} # 创建WebSocket连接的处理函数 async def handler(websocket, path): - msg = "" try: # 在循环中等待客户端的消息 async for message in websocket: @@ -131,10 +130,9 @@ async def handler(websocket, path): response = await function_A(websocket, message) await websocket.send(response) # 本地情况 - # await function_B(websocket, message) + await function_B(websocket, message) except Exception as e: msg = user_msg[websocket] - print("Exception=", msg) await function_B(websocket, msg)