From 89f15894dde95df119493bd4a912ec2702e6b218 Mon Sep 17 00:00:00 2001 From: Xiaodong Xie Date: Fri, 18 Oct 2024 00:31:45 +0200 Subject: [PATCH] Ignore more network related errors during websocket communication. (#5269) Intermittent network issues during websocket communication should not crash ComfyUi process. Co-authored-by: Xiaodong Xie --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index c7bf6622..ada6d90c 100644 --- a/server.py +++ b/server.py @@ -40,7 +40,7 @@ class BinaryEventTypes: async def send_socket_catch_exception(function, message): try: await function(message) - except (aiohttp.ClientError, aiohttp.ClientPayloadError, ConnectionResetError) as err: + except (aiohttp.ClientError, aiohttp.ClientPayloadError, ConnectionResetError, BrokenPipeError, ConnectionError) as err: logging.warning("send error: {}".format(err)) def get_comfyui_version():