mirror of
https://github.com/yusing/godoxy.git
synced 2026-02-16 15:37:42 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user