From 61ae3e7faae80d4d784e7940164594d02df7aa01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=B0=D0=B1?= =?UTF-8?q?=D1=83=D1=88=D0=BA=D0=B8=D0=BD?= Date: Thu, 3 Apr 2025 15:22:45 +0200 Subject: [PATCH] removed AGENTS_CONNECTED event --- tracker/tracker-assist/src/Assist.ts | 30 +--------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/tracker/tracker-assist/src/Assist.ts b/tracker/tracker-assist/src/Assist.ts index 94b9f8fef..67c45b20b 100644 --- a/tracker/tracker-assist/src/Assist.ts +++ b/tracker/tracker-assist/src/Assist.ts @@ -440,35 +440,6 @@ export default class Assist { } }); - socket.on("AGENTS_CONNECTED", (ids: string[]) => { - this.cleanCanvasConnections(); - ids.forEach((id) => { - const agentInfo = this.agents[id]?.agentInfo; - this.agents[id] = { - agentInfo, - onDisconnect: this.options.onAgentConnect?.(agentInfo), - }; - }); - if (this.app.active()) { - this.assistDemandedRestart = true; - this.app.stop(); - this.app.waitStatus(0).then(() => { - this.app.allowAppStart(); - setTimeout(() => { - this.app - .start() - .then(() => { - this.assistDemandedRestart = false; - }) - .then(() => { - this.remoteControl?.reconnect(ids); - }) - .catch((e) => app.debug.error(e)); - }, 100); - }); - } - }); - socket.on("AGENTS_INFO_CONNECTED", (agentsInfo: AgentInfo[]) => { this.cleanCanvasConnections(); agentsInfo.forEach((agentInfo) => { @@ -481,6 +452,7 @@ export default class Assist { if (this.app.active()) { this.assistDemandedRestart = true; this.app.stop(); + this.app.clearBuffers(); this.app.waitStatus(0).then(() => { this.app.allowAppStart(); setTimeout(() => {