removed AGENTS_CONNECTED event
This commit is contained in:
parent
5da51662af
commit
5072513047
1 changed files with 1 additions and 29 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue