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: TimeoutHandler timing out instantly #14568
Labels
Comments
ianlancetaylor
changed the title
TimeoutHandler timing out instantly
net/http: TimeoutHandler timing out instantly
Feb 29, 2016
CC @bradfitz This may be a documentation issue rather than a bug. I'm not sure. |
Looks like a bug to me. |
CL https://golang.org/cl/20046 mentions this issue. |
syncore
added a commit
to syncore/qlsbridge
that referenced
this issue
Mar 7, 2016
…of http requests when handler is registered; add IP field to JSON for use with indexing for front-end
@bradfitz ping |
CL https://golang.org/cl/22274 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Apr 19, 2016
…en serving request TimeoutHandler was starting the Timer when the handler was created, instead of when serving a request. It also was sharing it between multiple requests, which is incorrect, as the requests might start at different times. Store the timeout duration and create the Timer when ServeHTTP is called. Different requests will have different timers. The testing plumbing was simplified to store the channel used to control when timeout happens. It overrides the regular timer. Fixes #14568. Change-Id: I4bd51a83f412396f208682d3ae5e382db5f8dc81 Reviewed-on: https://go-review.googlesource.com/20046 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/22274 Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
go version
)?go env
)?(Use play.golang.org to provide a runnable example, if possible.)
http://play.golang.org/p/K9IgiTNaFk
204 No content
503 Service Unavailable
It looks like the timer of the timoutHandler is created when the handler is wrapped in
go/src/net/http/server.go
Line 2312 in fdd0179
timer.C
will have already triggered.The text was updated successfully, but these errors were encountered: