net/http: TimeoutHandler allows wrapped handlers crash server with panics #22084
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
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?
This happens because TimeoutHandler starts original handler in a separate goroutine:
I can work on fixing this by handling panic in this goroutine and re-raising it from the
The text was updated successfully, but these errors were encountered: