diff --git a/src/OrgnalR.Backplane.GrainImplementations/GroupActorGrain.cs b/src/OrgnalR.Backplane.GrainImplementations/GroupActorGrain.cs index 806ab1f..0690ce9 100644 --- a/src/OrgnalR.Backplane.GrainImplementations/GroupActorGrain.cs +++ b/src/OrgnalR.Backplane.GrainImplementations/GroupActorGrain.cs @@ -38,7 +38,7 @@ CancellationToken cancellationToken private Task WriteStateIfDirty(object? _) { - if (dirty) + if (!dirty) return Task.CompletedTask; return WriteStateAsync(); } diff --git a/src/OrgnalR.Backplane.GrainImplementations/UserActorGrain.cs b/src/OrgnalR.Backplane.GrainImplementations/UserActorGrain.cs index 37da9e1..244a8e2 100644 --- a/src/OrgnalR.Backplane.GrainImplementations/UserActorGrain.cs +++ b/src/OrgnalR.Backplane.GrainImplementations/UserActorGrain.cs @@ -38,7 +38,7 @@ CancellationToken cancellationToken private Task WriteStateIfDirty(object? _) { - if (dirty) + if (!dirty) return Task.CompletedTask; return WriteStateAsync(); }