Skip to content

Commit

Permalink
Correctly route undeserializable response messages from external clients
Browse files Browse the repository at this point in the history
(cherry picked from commit 5eef68ff5b78c519e782f582978f6fc550f25511)
  • Loading branch information
ReubenBond committed Nov 1, 2024
1 parent 30bdcf5 commit 5d84881
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Orleans.Core/Networking/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ private bool HandleReceiveMessageFailure(Message message, Exception exception)
// If the message was a response, propagate the exception to the intended recipient.
message.Result = Message.ResponseTypes.Error;
message.BodyObject = Response.FromException(exception);
this.MessageCenter.DispatchLocalMessage(message);
this.OnReceivedMessage(message);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Orleans.Runtime/Messaging/Gateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ internal SiloAddress TryToReroute(Message msg)
// connected to that gateway)
// So, if the TargetGrain is a SystemTarget we always trust the value from Message.TargetSilo and forward
// it to this address...
// EXCEPT if the value is equal to the current GatewayAdress: in this case we will return
// EXCEPT if the value is equal to the current GatewayAddress: in this case we will return
// null and the local dispatcher will forward the Message to a local SystemTarget activation
if (msg.TargetGrain.IsSystemTarget() && !IsTargetingLocalGateway(msg.TargetSilo))
{
Expand Down

0 comments on commit 5d84881

Please sign in to comment.