Skip to content

Commit 53c9ae5

Browse files
committed
pr suggestions
1 parent be1e327 commit 53c9ae5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/Orleans.Runtime/MembershipService/MembershipTableManager.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -537,13 +537,7 @@ private async Task<bool> CleanupMyTableEntries(MembershipTableData table)
537537
}
538538
}
539539

540-
try
541-
{
542-
await Task.WhenAll(completions).WaitAsync(_shutdownCts.Token);
543-
}
544-
catch (OperationCanceledException) when (_shutdownCts.IsCancellationRequested)
545-
{
546-
}
540+
await Task.WhenAll(completions).WaitAsync(_shutdownCts.Token);
547541
return true;
548542
}
549543

@@ -667,7 +661,14 @@ public async Task ProcessSuspectOrKillLists()
667661
{
668662
runningFailureCount += 1;
669663
LogErrorProcessingSuspectOrKillLists(this.log, ex, runningFailureCount);
670-
await _trySuspectOrKillChannel.Writer.WriteAsync(request, _shutdownCts.Token);
664+
if (request.Completion is not null)
665+
{
666+
request.Completion.TrySetException(ex);
667+
}
668+
else
669+
{
670+
await _trySuspectOrKillChannel.Writer.WriteAsync(request, _shutdownCts.Token);
671+
}
671672
}
672673

673674
if (!reader.TryPeek(out _))

0 commit comments

Comments
 (0)