From 5d425aadb1b433097c9c78ed2f7145274e7b008d Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:12:58 +0800 Subject: [PATCH] fix: close connection when monitor stopped --- backend/services/monitor_service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/services/monitor_service.go b/backend/services/monitor_service.go index fc0e82c..4ed31fa 100644 --- a/backend/services/monitor_service.go +++ b/backend/services/monitor_service.go @@ -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