-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Timeout middleware should propagate context.Context on echo.Context http Request #1909
Comments
This will let middlewares/handler later on the chain to properly handle the Timeout middleware Context cancellation. Fixes labstack#1909
I have been thinking but have not investigated it but I suspect |
I think you are right. Maybe we can try to clone the Context before passing it to the goroutine, and because that gouroutine is not intended to pass information back into the context to "upper" middlewares in the chain it would be OK if it is a copy and not the original. |
This will let middlewares/handler later on the chain to properly handle the Timeout middleware Context cancellation. Fixes #1909
Issue Description
When the Timeout middleware is used and the timeout is reached, the http.Request Context propagated isn't properly cancelled.
Expected behavior
With the server example below this logs should be seen
Actual behavior
With the server example below this logs are seen
Steps to reproduce
Perform this request to the server example below
Working code to debug
Version/commit
4.3.0
The text was updated successfully, but these errors were encountered: