File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
projects/RabbitMQ.Client/Impl Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -282,16 +282,12 @@ await _confirmSemaphore.WaitAsync(reason.CancellationToken)
282282 {
283283 if ( _publisherConfirmationsEnabled )
284284 {
285- /*
286- if (_publisherConfirmationTrackingEnabled )
285+ if ( _publisherConfirmationTrackingEnabled &&
286+ _maxOutstandingConfirmationsSemaphore is not null )
287287 {
288- if (_maxOutstandingConfirmationsSemaphore is not null)
289- {
290- await _maxOutstandingConfirmationsSemaphore.WaitAsync(cancellationToken)
291- .ConfigureAwait(false);
292- }
288+ await _maxOutstandingConfirmationsSemaphore . WaitAsync ( cancellationToken )
289+ . ConfigureAwait ( false ) ;
293290 }
294- */
295291
296292 await _confirmSemaphore . WaitAsync ( cancellationToken )
297293 . ConfigureAwait ( false ) ;
@@ -343,19 +339,19 @@ private async Task MaybeEndPublisherConfirmationTracking(PublisherConfirmationIn
343339 {
344340 if ( _publisherConfirmationsEnabled )
345341 {
342+ if ( _publisherConfirmationTrackingEnabled &&
343+ _maxOutstandingConfirmationsSemaphore is not null )
344+ {
345+ _maxOutstandingConfirmationsSemaphore . Release ( ) ;
346+ }
347+
346348 _confirmSemaphore . Release ( ) ;
347349
348350 if ( publisherConfirmationInfo is not null )
349351 {
350352 await publisherConfirmationInfo . MaybeWaitForConfirmationAsync ( cancellationToken )
351353 . ConfigureAwait ( false ) ;
352354 }
353-
354- if ( _publisherConfirmationTrackingEnabled &&
355- _maxOutstandingConfirmationsSemaphore is not null )
356- {
357- // _maxOutstandingConfirmationsSemaphore.Release();
358- }
359355 }
360356 }
361357 }
You can’t perform that action at this time.
0 commit comments