Fixed: An agent do not disconnect correctly after removed (#617)

This commit is contained in:
Dominika Jadowska 2024-10-13 14:40:40 +02:00 committed by GitHub
parent 109222f024
commit 9e89f49e38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,6 +98,8 @@ export class AgentManager {
if (bean) { if (bean) {
await R.trash(bean); await R.trash(bean);
let endpoint = bean.endpoint; let endpoint = bean.endpoint;
this.disconnect(endpoint);
this.sendAgentList();
delete this.agentSocketList[endpoint]; delete this.agentSocketList[endpoint];
} else { } else {
throw new Error("Agent not found"); throw new Error("Agent not found");