-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Problems to cancel a request (CancellationToken) #893
Comments
maybe |
I have tried to use that property in the API and the result is the same :-( |
Sorry @jurgi, I'd not elaborated clearly ,that's not been implemented by |
Any update on this issue? I will likely need to abandon Ocelot without this feature. |
Hello, |
Hi, is there any further update on this issue? |
Seemed not 😢 |
Hi, are there any plans to fix this? This is really a very unpleasant error |
Well, this one caught me by surprise. Any chance that this will be fixed in a near future? Checked PR 1367 from @jlukawska and to my understanding this would be an easy fix to merge. Thanks. |
Please merge PR #1367! I just confirmed that it still is a fully functioning fix for this issue. Request cancellation is a basic concept; we should be able to rely on Ocelot to handle this correctly. We were very surprised to find out that it's (no longer) working correctly, we're using Ocelot for quite some time now and we think it was functioning in the past (maybe before version 16.0.0?). |
I'm afraid the Ocelot project is no longer maintained :( Nothing has been merged for a long time. |
@TomPallister please chime in! |
@jurgi Hi Iurgi! You are the issue reporter! So, could you confirm the bug is still in v19.0.2 please? |
I can confirm that this bug is still present in v19.0.2 |
Hi @dvandenhoek ! |
@yangzhongke @wast @TomPallister @thiagoloureiro @sharpn @RaynaldM @raman-m |
* #893 fix request cancellation, add acceptance test * correct exception message * correct exception message * #893 fix request cancellation, add acceptance test * correct exception message * correct exception message * Add more conditions in Then criteria * Update MultiplexingMiddleware.cs * Update CancelRequestTests.cs * Fix StyleCop and IDE analyzers issues * 'using' workarounds * Convert to file-scoped namespace * Fix warnings * IDE0044 Make field readonly. Add readonly modifier * review the code --------- Co-authored-by: Raman Maksimchuk <[email protected]> Co-authored-by: Raman Maksimchuk <[email protected]>
@jurgi Congrats! 🎉 |
Expected Behavior
The action of the api does not correctly receive the cancellation token when aborting a request through Ocelot.
Actual Behavior
By calling the api directly and while it is running, I cancel the request. The CancellationToken parameter takes the correct value and the appropriate exception is thrown.
On the other hand, if I make the same request through Ocelot, the exception is not thrown.
Steps to Reproduce the Problem
Api Code
Direct request to the api: http://.../api/v1/Payments/2
Request to the api through Ocelot: https://.../api/v1/Payments/2
Ocelot logs:
api logs:
Ocelot config:
Ocelot Startup.cs
Specifications
The text was updated successfully, but these errors were encountered: