@@ -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 =
@@ -416,7 +416,7 @@ public void DeleteRecordedBinding(RecordedBinding rb)
416
416
{
417
417
lock ( m_recordedEntitiesLock )
418
418
{
419
- m_recordedBindings . Remove ( rb ) ;
419
+ ( ( IDictionary < RecordedBinding , byte > ) m_recordedBindings ) . Remove ( rb ) ;
420
420
}
421
421
}
422
422
@@ -446,7 +446,7 @@ public void DeleteRecordedExchange(string name)
446
446
var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
447
447
foreach ( RecordedBinding b in bs )
448
448
{
449
- m_recordedBindings . Remove ( b ) ;
449
+ DeleteRecordedBinding ( b ) ;
450
450
MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
451
451
}
452
452
}
@@ -462,7 +462,7 @@ public void DeleteRecordedQueue(string name)
462
462
var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
463
463
foreach ( RecordedBinding b in bs )
464
464
{
465
- m_recordedBindings . Remove ( b ) ;
465
+ DeleteRecordedBinding ( b ) ;
466
466
MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
467
467
}
468
468
}
@@ -521,7 +521,7 @@ public void RecordBinding(RecordedBinding rb)
521
521
{
522
522
lock ( m_recordedEntitiesLock )
523
523
{
524
- m_recordedBindings . Add ( rb , 0 ) ;
524
+ m_recordedBindings . TryAdd ( rb , 0 ) ;
525
525
}
526
526
}
527
527
0 commit comments