@@ -73,7 +73,7 @@ public class AutorecoveringConnection : IConnection, IRecoverable
73
73
74
74
protected List < AutorecoveringModel > m_models = new List < AutorecoveringModel > ( ) ;
75
75
76
- protected IDictionary < RecordedBinding , byte > m_recordedBindings =
76
+ protected ConcurrentDictionary < RecordedBinding , byte > m_recordedBindings =
77
77
new ConcurrentDictionary < RecordedBinding , byte > ( ) ;
78
78
79
79
protected List < EventHandler < ConnectionBlockedEventArgs > > m_recordedBlockedEventHandlers =
@@ -463,7 +463,7 @@ public void DeleteRecordedBinding(RecordedBinding rb)
463
463
{
464
464
lock ( m_recordedEntitiesLock )
465
465
{
466
- m_recordedBindings . Remove ( rb ) ;
466
+ ( ( IDictionary < RecordedBinding , int > ) m_recordedBindings ) . Remove ( rb ) ;
467
467
}
468
468
}
469
469
@@ -493,7 +493,7 @@ public void DeleteRecordedExchange(string name)
493
493
var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
494
494
foreach ( RecordedBinding b in bs )
495
495
{
496
- m_recordedBindings . Remove ( b ) ;
496
+ DeleteRecordedBinding ( b ) ;
497
497
MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
498
498
}
499
499
}
@@ -509,7 +509,7 @@ public void DeleteRecordedQueue(string name)
509
509
var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
510
510
foreach ( RecordedBinding b in bs )
511
511
{
512
- m_recordedBindings . Remove ( b ) ;
512
+ DeleteRecordedBinding ( b ) ;
513
513
MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
514
514
}
515
515
}
@@ -568,7 +568,7 @@ public void RecordBinding(RecordedBinding rb)
568
568
{
569
569
lock ( m_recordedEntitiesLock )
570
570
{
571
- m_recordedBindings . Add ( rb , 0 ) ;
571
+ m_recordedBindings . TryAdd ( rb , 0 ) ;
572
572
}
573
573
}
574
574
0 commit comments