Skip to content

Commit 2c0b7ee

Browse files
committed
Fix rare deadlock, second try
Fixes #1751 See if not awaiting `_reader.Completion` fixes the issue.
1 parent 0a4cec0 commit 2c0b7ee

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

projects/RabbitMQ.Client/ConsumerDispatching/ConsumerDispatcherChannelBase.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,14 @@ public async Task WaitForShutdownAsync()
161161
{
162162
try
163163
{
164-
await _reader.Completion
165-
.ConfigureAwait(false);
164+
/*
165+
* rabbitmq/rabbitmq-dotnet-client#1751
166+
* Awaiting the work channel reader could deadlock - no idea why.
167+
* Since we await the consumer dispatcher _worker task,
168+
* that should suffice.
169+
*
170+
* await _reader.Completion.ConfigureAwait(false);
171+
*/
166172
await _worker
167173
.ConfigureAwait(false);
168174
}

0 commit comments

Comments
 (0)