diff --git a/web/scripts/api.js b/web/scripts/api.js index 6ffff4a0..17330cf0 100644 --- a/web/scripts/api.js +++ b/web/scripts/api.js @@ -39,7 +39,9 @@ class ComfyApi extends EventTarget { this.socket.addEventListener("error", () => { if (this.socket) this.socket.close(); - this.#pollQueue(); + if (!opened) { + this.#pollQueue(); + } }); this.socket.addEventListener("close", () => {