-
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
PipeTo creates an invalid Status.Failure object if task is cancelled #1521
Comments
Do note that the |
I've refactored to this method to do this like 3 times, but then I remember that the way it's designed currently is consistent with the JVM design and even enforced via unit test. Frankly I think the JVM design here is pretty shitty - just throw an exception. |
What if we just create a TaskCancelledException there? It won't break current design, although looks a bit weird, and I see similar code in other modules akka.net/src/core/Akka/Actor/Inbox.Actor.cs Line 127 in cf7cd6f
|
Hello. Any word on a fix for this issue? I'm getting the same issue. |
Related: #3320 |
Resolved via #5123 |
The following code cause problems if
tresult
is cancelledakka.net/src/core/Akka/Actor/PipeToSupport.cs
Line 29 in e724d60
If user does not handle this message in
recipient
actor andakka.actor.debug.unhandled = true
,NullReferenceException
is thrown, asUnhandledMessageForwarder
callsmessage.ToString()
akka.net/src/core/Akka/Event/LoggingBus.cs
Line 235 in cf7cd6f
Status.Failure
does not check the input parameter andToString()
overload callsCause.ToString()
w/o checking for null.akka.net/src/core/Akka/Actor/ActorBase.cs
Line 48 in 4974426
What'd be the correct way to fix this? I see a couple of possible fixes:
TaskCancelledException
insidePipeToSupport
classStatus.Failure
and allow to create an instance without specifying an exception - maybe indicate that task was cancelled by passing a task instanceThe text was updated successfully, but these errors were encountered: