fix: close connection when monitor stopped

This commit is contained in:
Lykin 2024-12-05 17:12:58 +08:00
parent c02a24ee94
commit 5d425aadb1
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ func (c *monitorService) StopMonitor(server string) (resp types.JSResp) {
}
//close(item.ch)
item.client.Close()
close(item.closeCh)
delete(c.items, server)
resp.Success = true