You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect panics from http.Handlers to be handled by http.Server as documented (recovered), i.e. with the sentinel panic value http.ErrAbortHandler this program outputs something like this:
2017/09/28 22:55:18 Get http://127.0.0.1:52111: EOF
I can work on fixing this by handling panic in this goroutine and re-raising it from the timeoutHandler.ServeHTTP itself, so it's handled by the Server. Please assign this to me if this solution looks ok.
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
https://play.golang.org/p/Ycz0W8a_ff
What did you expect to see?
I expect panics from http.Handlers to be handled by http.Server as documented (recovered), i.e. with the sentinel panic value http.ErrAbortHandler this program outputs something like this:
What did you see instead?
Program crashes:
System details
This happens because TimeoutHandler starts original handler in a separate goroutine:
go/src/net/http/server.go
Lines 3042 to 3045 in 78a0a31
I can work on fixing this by handling panic in this goroutine and re-raising it from the
timeoutHandler.ServeHTTP
itself, so it's handled by the Server. Please assign this to me if this solution looks ok.The text was updated successfully, but these errors were encountered: