-
Notifications
You must be signed in to change notification settings - Fork 1k
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
When Ask<> called with timeout == TimeSpan zero, timeout is never risen nor argument exception is thrown #6131
Comments
We do allow |
Fixing this is much more complicated than we thought, we'll try and a Roslyn Analyzer to catch this in the future. |
Changing the internals of |
* Check for `TimeSpan.Zero` on `Ask` and `Ask<T>` operationrs close #11 close akkadotnet/akka.net#6131 * working on specs * sdfsdf * have tests finally starting to pass * cleaning up tests and unused code * disabled variable scanning - not supported yet
Version Information
Akka.NET 1.4.38
Which Akka.NET Modules? Akka
Describe the bug
In call to Ask extension method, passing timeout with value TimeSpan.Zero causes method to block indefinitely without throwing AskTimeoutException
To Reproduce
Expected behavior
Ask
extension method will thrownArgumentException
with message disallowing to use zero.OR
AskTimeoutException
will be thrown immediately without allocating other objects in method.I'd prefer first expectation as calling
Ask
with zero timeout contradicts any need to call of that method.Usually this comes from code error (as in my case) from code dynamically fetching or calculating timeout.
Actual behavior
Thread is blocked indefinitely.
Screenshots
Environment
.NET Framework 4.8. Windows 10 64bit.
The text was updated successfully, but these errors were encountered: