Try to use context.WithTimeout to detect HTTP timeout. Hopefully it might work.

This commit is contained in:
Star Brilliant
2018-11-07 18:47:01 +08:00
parent bb1e21778a
commit f8b40c4bfc
3 changed files with 9 additions and 9 deletions

View File

@@ -172,7 +172,6 @@ func (c *Client) newHTTPClient() error {
MaxIdleConns: 100,
MaxIdleConnsPerHost: 10,
Proxy: http.ProxyFromEnvironment,
ResponseHeaderTimeout: time.Duration(c.conf.Timeout) * time.Second,
TLSHandshakeTimeout: time.Duration(c.conf.Timeout) * time.Second,
}
if c.conf.NoIPv6 {