Skip to content

Commit ea3c5c4

Browse files
committed
If work is left finish that first
1 parent 75a72ce commit ea3c5c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/client/RabbitMQ.Client/src/client/impl/AsyncConsumerWorkService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async Task Loop()
7878
// Swallowing the task cancellation in case we are stopping work.
7979
}
8080

81-
while (_tokenSource.IsCancellationRequested == false && _workQueue.TryDequeue(out Work work))
81+
while (_workQueue.TryDequeue(out Work work))
8282
{
8383
await work.Execute(_model).ConfigureAwait(false);
8484
}

projects/client/RabbitMQ.Client/src/client/impl/ConsumerWorkService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async Task Loop()
7777
// Swallowing the task cancellation exception for the semaphore in case we are stopping.
7878
}
7979

80-
while (_tokenSource.IsCancellationRequested == false && _actions.TryDequeue(out Action action))
80+
while (_actions.TryDequeue(out Action action))
8181
{
8282
try
8383
{

0 commit comments

Comments
 (0)