File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -386,20 +386,18 @@ public virtual void OnBasicNack(BasicNackEventArgs args)
386
386
387
387
protected virtual void handleAckNack ( ulong deliveryTag , bool multiple , bool isNack )
388
388
{
389
- if ( multiple ) {
390
- lock ( m_unconfirmedSet . SyncRoot )
391
- {
389
+ lock ( m_unconfirmedSet . SyncRoot )
390
+ {
391
+ if ( multiple ) {
392
392
for ( ulong i = ( ulong ) m_unconfirmedSet [ 0 ] ; i <= deliveryTag ; i ++ ) {
393
393
// removes potential duplicates
394
394
while ( m_unconfirmedSet . Remove ( i ) )
395
395
{ }
396
396
}
397
- }
398
- } else {
399
- while ( m_unconfirmedSet . Remove ( deliveryTag ) )
400
- { }
401
- }
402
- lock ( m_unconfirmedSet . SyncRoot ) {
397
+ } else {
398
+ while ( m_unconfirmedSet . Remove ( deliveryTag ) )
399
+ { }
400
+ }
403
401
m_onlyAcksReceived = m_onlyAcksReceived && ! isNack ;
404
402
if ( m_unconfirmedSet . Count == 0 )
405
403
Monitor . Pulse ( m_unconfirmedSet . SyncRoot ) ;
You can’t perform that action at this time.
0 commit comments