removed AGENTS_CONNECTED event

This commit is contained in:
Андрей Бабушкин 2025-04-03 15:22:45 +02:00
parent 5da51662af
commit 5072513047

View file

@ -437,35 +437,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) => {
@ -478,6 +449,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(() => {