From 4eef69a3d4fcd9cafec419f76f3fd0de8f9a415e Mon Sep 17 00:00:00 2001 From: Wankko Ree Date: Mon, 27 Apr 2026 03:59:33 +0800 Subject: [PATCH 1/2] fix: close http connections when each ip test ended --- task/httping.go | 1 + 1 file changed, 1 insertion(+) diff --git a/task/httping.go b/task/httping.go index 485ec4a..2f36d69 100644 --- a/task/httping.go +++ b/task/httping.go @@ -37,6 +37,7 @@ func (p *Ping) httping(ip *net.IPAddr) (int, time.Duration, string) { return http.ErrUseLastResponse // 阻止重定向 }, } + defer hc.CloseIdleConnections() // 先访问一次获得 HTTP 状态码 及 地区码 var colo string From 1af76023d2fa8b4043741135866b9c69440131e8 Mon Sep 17 00:00:00 2001 From: Wankko Ree Date: Wed, 29 Apr 2026 19:01:49 +0800 Subject: [PATCH 2/2] fix: close connections when each download test ended --- task/download.go | 1 + 1 file changed, 1 insertion(+) diff --git a/task/download.go b/task/download.go index a9c7cd8..9a4ba82 100644 --- a/task/download.go +++ b/task/download.go @@ -155,6 +155,7 @@ func downloadHandler(ip *net.IPAddr) (float64, string) { return nil }, } + defer client.CloseIdleConnections() req, err := http.NewRequest("GET", URL, nil) if err != nil { if utils.Debug { // 调试模式下,输出更多信息