Skip to content

Commit 13de610

Browse files
committed
* Remove TCS from _confirmsTaskCompletionSources if there is an OperationCanceledException.
1 parent 8247b41 commit 13de610

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

projects/RabbitMQ.Client/Impl/Channel.PublisherConfirms.cs

+5
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ private async Task MaybeEndPublisherConfirmationTracking(PublisherConfirmationIn
380380
await publisherConfirmationInfo.MaybeWaitForConfirmationAsync(cancellationToken)
381381
.ConfigureAwait(false);
382382
}
383+
catch (OperationCanceledException)
384+
{
385+
_confirmsTaskCompletionSources.Remove(publisherConfirmationInfo.PublishSequenceNumber, out _);
386+
throw;
387+
}
383388
finally
384389
{
385390
publisherConfirmationInfo.Dispose();

0 commit comments

Comments
 (0)