From 857cbde27ea1789218e5b5b787f042eeb876ced0 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Thu, 3 Oct 2024 10:04:32 -0700 Subject: [PATCH] Add Note --- projects/RabbitMQ.Client/Impl/ChannelBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/RabbitMQ.Client/Impl/ChannelBase.cs b/projects/RabbitMQ.Client/Impl/ChannelBase.cs index 8c4c132f8..b7ed8e6ce 100644 --- a/projects/RabbitMQ.Client/Impl/ChannelBase.cs +++ b/projects/RabbitMQ.Client/Impl/ChannelBase.cs @@ -1841,6 +1841,11 @@ await _confirmSemaphore.WaitAsync(cancellationToken) } else { + /* + * Note: + * In the case of `basic.return`, the TCS will have been handled and removed by HandleBasicReturn() + * RabbitMQ still sends `basic.ack`, so the TCS will not be in the dict, hence, TryGetValue here + */ if (_confirmsTaskCompletionSources.TryGetValue(deliveryTag, out TaskCompletionSource? tcs)) { tcs.SetResult(isAck);