diff --git a/chat.py b/chat.py index d88e5a0ea664116d3b77383f4f234b49d5564fcc..006a2590da254fba5652abdd1d2913ace0e21b5b 100644 --- a/chat.py +++ b/chat.py @@ -51,7 +51,7 @@ async def echo(websocket): else : # h = [] h = 0; - r = {'type':'history_num','content':h} + r = {'type':'history_num','content':str(h)} message = json.dumps(r,ensure_ascii=False) await websocket.send(message) #历史记录