Fix websocket connection and goroutine leaks in Clash API

Co-authored-by: traitman <112139837+traitman@users.noreply.github.com>
This commit is contained in:
世界
2026-03-09 15:38:25 +08:00
parent e1477bd065
commit e21a72fcd1
3 changed files with 15 additions and 5 deletions

View File

@@ -38,6 +38,7 @@ func getConnections(ctx context.Context, trafficManager *trafficontrol.Manager)
if err != nil {
return
}
defer conn.Close()
intervalStr := r.URL.Query().Get("interval")
interval := 1000