Skip to content

Commit ef73206

Browse files
authored
Merge pull request #1782 from rabbitmq/rabbitmq-dotnet-client-1751-2
Fix rare deadlock, second try
2 parents 0a4cec0 + 2c0b7ee commit ef73206

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)