Hey, I've been trying to wrap my head around this for like a while now. I have a websockets server, which handles connections (ofcourse lol). It seems that the code is blocking? Even though it shouldn't be:
async def handle_client(websocket, path):
try:
await websocket.send(json.dumps({"event": events.HeartBeatEvent, "args": []}))
async for message in websocket:
data = json.loads(message)
if "event" not in data:
continue
event = data["event"]
await handle_panel_request(websocket, event, data["args"])
finally:
print("conection lost")
I never get the connection lost print message, even though I've clearly disconnected from the connection client-side, also any other clients can't connect to it.