diff --git a/pretor/api/cluster.py b/pretor/api/cluster.py index bee6e5f..178e5c4 100644 --- a/pretor/api/cluster.py +++ b/pretor/api/cluster.py @@ -39,7 +39,7 @@ async def update_cluster_state(websocket: WebSocket): except WebSocketDisconnect: pass except RuntimeError as e: - if "closed" not in str(e): + if "closed" not in str(e) and "GeneratorExit" not in str(e): raise except Exception: pass \ No newline at end of file diff --git a/pretor/api/workflow.py b/pretor/api/workflow.py index b7051d0..0a42980 100644 --- a/pretor/api/workflow.py +++ b/pretor/api/workflow.py @@ -32,7 +32,7 @@ async def get_workflow(websocket: WebSocket, event_id: str): except WebSocketDisconnect: pass except RuntimeError as e: - if "closed" not in str(e): + if "closed" not in str(e) and "GeneratorExit" not in str(e): raise except Exception: pass