refactor(health): allow connection reuse in HTTP pinger

- Commented out the SetConnectionClose method to enable connection reuse for HTTP requests, improving performance.
- This is a follow up commit to be9af03a1e setting MaxConnsPerHost to 1000
This commit is contained in:
yusing
2026-02-15 20:03:01 +08:00
parent f92e96831c
commit cc516d23db

View File

@@ -45,7 +45,7 @@ func HTTP(url *url.URL, method, path string, timeout time.Duration) (types.Healt
req.SetRequestURI(url.JoinPath(path).String())
req.Header.SetMethod(method)
setCommonHeaders(req.Header.Set)
req.SetConnectionClose()
// req.SetConnectionClose() // allow connection reuse
start := time.Now()
respErr := pinger.DoTimeout(req, resp, timeout)