diff --git a/src/core/Akka/Actor/ActorRef.cs b/src/core/Akka/Actor/ActorRef.cs index 19a4ebab5fb..96353c32da9 100644 --- a/src/core/Akka/Actor/ActorRef.cs +++ b/src/core/Akka/Actor/ActorRef.cs @@ -134,6 +134,10 @@ protected override void TellInternal(object message, IActorRef sender) { _result.TrySetResult(t); } + else if (message is Failure f) + { + _result.TrySetException(f.Exception ?? new TaskCanceledException("Task cancelled by actor via Failure message.")); + } else { _result.TrySetException(new ArgumentException( @@ -142,7 +146,7 @@ protected override void TellInternal(object message, IActorRef sender) } } } - + /// /// TBD ///