mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-17 07:05:12 +08:00
fix: stop site on chmod failure to avoid running with wrong permissions
This commit is contained in:
parent
4b616bca4f
commit
397bd47bc2
@ -1238,7 +1238,12 @@ class PromptServer():
|
||||
os.unlink(unix_socket)
|
||||
site = web.UnixSite(runner, unix_socket)
|
||||
await site.start()
|
||||
os.chmod(unix_socket, 0o660)
|
||||
try:
|
||||
os.chmod(unix_socket, 0o660)
|
||||
except OSError as e:
|
||||
await site.stop()
|
||||
await runner.cleanup()
|
||||
raise RuntimeError(f"Failed to set socket permissions: {e}")
|
||||
self.address = unix_socket
|
||||
self.port = None
|
||||
self.unix_socket = unix_socket
|
||||
|
||||
Loading…
Reference in New Issue
Block a user