Skip to content

Commit 857cbde

Browse files
committed
Add Note
1 parent ec993b3 commit 857cbde

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

projects/RabbitMQ.Client/Impl/ChannelBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,11 @@ await _confirmSemaphore.WaitAsync(cancellationToken)
18411841
}
18421842
else
18431843
{
1844+
/*
1845+
* Note:
1846+
* In the case of `basic.return`, the TCS will have been handled and removed by HandleBasicReturn()
1847+
* RabbitMQ still sends `basic.ack`, so the TCS will not be in the dict, hence, TryGetValue here
1848+
*/
18441849
if (_confirmsTaskCompletionSources.TryGetValue(deliveryTag, out TaskCompletionSource<bool>? tcs))
18451850
{
18461851
tcs.SetResult(isAck);

0 commit comments

Comments
 (0)