From 736cd2bebd3d1781707cab726141336c0a8e328b Mon Sep 17 00:00:00 2001 From: shadowcz007 Date: Sat, 4 May 2024 09:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=97=A7=E7=89=88comfyui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index b55bde2..a02c2ea 100644 --- a/__init__.py +++ b/__init__.py @@ -484,10 +484,14 @@ async def new_start(self, address, port, verbose=True, call_on_start=None): # print("\033[93mTo see the GUI go to: https://{}:{}\033[0m".format(address, https_port)) if call_on_start is not None: - if scheme=='https': - call_on_start(scheme,address, https_port) - else: - call_on_start(scheme,address, http_port) + try: + if scheme=='https': + call_on_start(scheme,address, https_port) + else: + call_on_start(scheme,address, http_port) + except: + call_on_start(address,http_port) + except Exception as e: print(f"Error starting the server: {e}")