New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: Timeouts are kicking in on established connections #8465
Labels
Comments
For the record, this is the Transport I was using in Go 1.2.1 Transport: &http.Transport{ TLSClientConfig: &tls.Config{ InsecureSkipVerify: hc.SkipTLS, }, Dial: func(network, addr string) (net.Conn, error) { deadline := time.Now().Add(hc.Timeout) c, err := net.DialTimeout(network, addr, hc.Timeout) if err != nil { return nil, err } c.SetDeadline(deadline) return c, nil }, }, |
Please read the docs on all the various timeout knobs. They all affect different phases of the request. Timeout is documented to say: // Timeout specifies a time limit for requests made by this // Client. The timeout includes connection time, any // redirects, and reading the response body. The timer remains // running after Get, Head, Post, or Do return and will // interrupt reading of the Response.Body. // // A Timeout of zero means no timeout. The way you were doing it before with DialTimeout is totally different. Status changed to WorkingAsIntended. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by camilo.aguilar:
The text was updated successfully, but these errors were encountered: