From 9913114044ceb929ac7cd18133af195e96c5e79b Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Fri, 3 Mar 2023 21:13:11 +0000 Subject: [PATCH] Only poll if it has never opened --- web/scripts/api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/scripts/api.js b/web/scripts/api.js index 6ffff4a00..17330cf01 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", () => {