fix cleanup

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
Frank Villaro-Dixon 2024-09-02 12:07:33 +02:00
parent e763978b4a
commit 73556d37ec

View file

@ -29,7 +29,7 @@ async def handler(websocket):
print(f"Connection closed: {e}") print(f"Connection closed: {e}")
finally: finally:
# Unregister the client # Unregister the client
connected_clients.remove(websocket) connected_clients.get(websocket.request.path, set()).remove(websocket)
async def main(): async def main():
# Start the WebSocket server # Start the WebSocket server