FIX double-encoding of json
This commit is contained in:
parent
6ce715c761
commit
4e9abf81b8
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ async def websocket_counter(websocket: WebSocket, cid: int):
|
|||
while True:
|
||||
try:
|
||||
val = counter_store.get(cid)
|
||||
await websocket.send_json(Value(counter=cid, value=val).json())
|
||||
await websocket.send_json(jsonable_encoder(Value(counter=cid, value=val)))
|
||||
except WebSocketDisconnect:
|
||||
logging.debug("client disconnected")
|
||||
manager.unsubscribe(cid, q)
|
||||
|
|
Loading…
Reference in a new issue