Open Karql opened 3 years ago
Could you create a branch with the corresponding test so I can check and debug what is hapenning in this case? Thanks
Hi ;)
https://github.com/Karql/RateLimiter/tree/issue-27
Put break point here:
When debugger stops on it put break point in CountByIntervalAwaitableConstraint.WaitForReadiness(CancellationToken cancellationToken)
Second call this method show that _Semaphore is closed
Hi!
At the begining I would like you for great stuff ;)
I've found a bug when using ComposedAwaitableConstraint with Cancellation token.
My use case:
Simplified example:
Problem is here:
_AwaitableConstraint2 (for hour) return:
_AwaitableConstraint1 (for second) throw TaskCancelled exception
Result is that OnEnded wont be never called and _Semaphores wont be released.
I can create new limiter after cancellation but maybe expose method like. TryRelease() on IAwaitableConstraint and call it on exception woluld be better option?
Best regards, Mateusz