-
Notifications
You must be signed in to change notification settings - Fork 843
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
Enable direct cancellation for IHttpForwarder #1985
Conversation
While on the topic, should we augment |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
de294d5
to
69fb774
Compare
Updated. How does that look @MihaZupan? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
We should also add CTs to the new extension methods we just added - https://github.com/microsoft/reverse-proxy/blob/main/src/ReverseProxy/Routing/DirectForwardingIEndpointRouteBuilderExtensions.cs. I can do that as a followup.
Nvm :)
? Those are route table wire-up methods, there's nothing to cancel. The one place we do call the forwarder would only ever be cancelled by the RequestAborted token. |
Fixes #1542
Some customers using IHttpForwarder directly have asked for the ability to pass their own cancellation token. Today they have to replace HttpContext.RequestAborted which can be error prone.
This uses a Default Interface Method to avoid a breaking change.