fix: close http connections when each ip test ended

This commit is contained in:
Wankko Ree
2026-04-27 03:59:33 +08:00
parent 493dbd796a
commit 4eef69a3d4

View File

@@ -37,6 +37,7 @@ func (p *Ping) httping(ip *net.IPAddr) (int, time.Duration, string) {
return http.ErrUseLastResponse // 阻止重定向 return http.ErrUseLastResponse // 阻止重定向
}, },
} }
defer hc.CloseIdleConnections()
// 先访问一次获得 HTTP 状态码 及 地区码 // 先访问一次获得 HTTP 状态码 及 地区码
var colo string var colo string