revert: remove explicit WebSocket close that caused immediate disconnection

This commit is contained in:
Fusion
2026-05-24 16:12:21 +02:00
parent b89fb608b6
commit f59274ae64
-6
View File
@@ -101,12 +101,6 @@ async def terminal_websocket(
for task in pending: for task in pending:
task.cancel() task.cancel()
# Close WebSocket cleanly to avoid 1006 abnormal closure
try:
await websocket.close(code=1000)
except Exception:
pass
except Exception as exc: except Exception as exc:
logger.error("Terminal session error for instance %s: %s", instance_id, str(exc), exc_info=True) logger.error("Terminal session error for instance %s: %s", instance_id, str(exc), exc_info=True)
await websocket.close(code=4000, reason=f"Error: {exc}") await websocket.close(code=4000, reason=f"Error: {exc}")