Skip to content

Commit

Permalink
Fix for empty grain response (class without data or with default data…
Browse files Browse the repository at this point in the history
…) deseriaslized to null response on receiving end (#2027)
  • Loading branch information
Ivanvv authored Jul 2, 2023
1 parent 0f02cea commit 1230a66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Proto.Cluster/Grain/GrainResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ namespace Proto.Cluster;
/// </summary>
public partial class GrainResponse : IRootSerialized
{
//deserialize into the in-process message type that the grain actors understands
public IRootSerializable Deserialize(ActorSystem system)
{
if (MessageData.IsEmpty)
//special case for null messages
if (MessageData.IsEmpty && string.IsNullOrEmpty(MessageTypeName))
{
return new GrainResponseMessage(null);
}
Expand Down

0 comments on commit 1230a66

Please sign in to comment.