Remove websocket.close()

This commit is contained in:
grossmj committed 2024-03-16 16:00:27 +01:00
1 parent 03b491f7b1
commit 31c7fe88f1
4 files changed
+2 -15

No files matched your search

@@ -221,11 +221,6 @@ async def controller_ws_notifications(
log.info(f"Client {websocket.client.host}:{websocket.client.port} has disconnected from controller WebSocket")
except WebSocketException as e:
log.warning(f"Error while sending to controller event to WebSocket client: {e}")
finally:
try:
await websocket.close()
except OSError:
pass # ignore OSError: [Errno 107] Transport endpoint is not connected
# @Route.post(
@@ -305,10 +305,6 @@ async def project_ws_notifications(
except WebSocketException as e:
log.warning(f"Error while sending to project event to WebSocket client: {e}")
finally:
try:
await websocket.close()
except OSError:
pass # ignore OSError: [Errno 107] Transport endpoint is not connected
if project.auto_close:
# To avoid trouble with client connecting disconnecting we sleep few seconds before checking
# if someone else is not connected