Fix wildcard listen address detection for dual-stack (0.0.0.0,::)
This commit is contained in:
+2
-1
@@ -62,7 +62,8 @@ def _detect_comfy_address():
|
|||||||
if args.listen:
|
if args.listen:
|
||||||
listen = args.listen.strip()
|
listen = args.listen.strip()
|
||||||
# 0.0.0.0 / :: 表示监听所有接口,取本机实际出口 IP
|
# 0.0.0.0 / :: 表示监听所有接口,取本机实际出口 IP
|
||||||
host = _get_local_ip() if listen in ('0.0.0.0', '::') else listen
|
is_wildcard = listen in ('0.0.0.0', '::') or '0.0.0.0' in listen or listen.startswith('::')
|
||||||
|
host = _get_local_ip() if is_wildcard else listen
|
||||||
except Exception:
|
except Exception:
|
||||||
pass # 不在 ComfyUI 环境中也能降级运行
|
pass # 不在 ComfyUI 环境中也能降级运行
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user