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)
282
282
{
283
283
if ( _publisherConfirmationsEnabled )
284
284
{
285
- /*
286
- if (_publisherConfirmationTrackingEnabled )
285
+ if ( _publisherConfirmationTrackingEnabled &&
286
+ _maxOutstandingConfirmationsSemaphore is not null )
287
287
{
288
- if (_maxOutstandingConfirmationsSemaphore is not null)
289
- {
290
- await _maxOutstandingConfirmationsSemaphore.WaitAsync(cancellationToken)
291
- .ConfigureAwait(false);
292
- }
288
+ await _maxOutstandingConfirmationsSemaphore . WaitAsync ( cancellationToken )
289
+ . ConfigureAwait ( false ) ;
293
290
}
294
- */
295
291
296
292
await _confirmSemaphore . WaitAsync ( cancellationToken )
297
293
. ConfigureAwait ( false ) ;
@@ -343,19 +339,19 @@ private async Task MaybeEndPublisherConfirmationTracking(PublisherConfirmationIn
343
339
{
344
340
if ( _publisherConfirmationsEnabled )
345
341
{
342
+ if ( _publisherConfirmationTrackingEnabled &&
343
+ _maxOutstandingConfirmationsSemaphore is not null )
344
+ {
345
+ _maxOutstandingConfirmationsSemaphore . Release ( ) ;
346
+ }
347
+
346
348
_confirmSemaphore . Release ( ) ;
347
349
348
350
if ( publisherConfirmationInfo is not null )
349
351
{
350
352
await publisherConfirmationInfo . MaybeWaitForConfirmationAsync ( cancellationToken )
351
353
. ConfigureAwait ( false ) ;
352
354
}
353
-
354
- if ( _publisherConfirmationTrackingEnabled &&
355
- _maxOutstandingConfirmationsSemaphore is not null )
356
- {
357
- // _maxOutstandingConfirmationsSemaphore.Release();
358
- }
359
355
}
360
356
}
361
357
}
You can’t perform that action at this time.
0 commit comments