@@ -73,7 +73,7 @@ public class AutorecoveringConnection : IConnection, IRecoverable
7373
7474 protected List < AutorecoveringModel > m_models = new List < AutorecoveringModel > ( ) ;
7575
76- protected IDictionary < RecordedBinding , byte > m_recordedBindings =
76+ protected ConcurrentDictionary < RecordedBinding , byte > m_recordedBindings =
7777 new ConcurrentDictionary < RecordedBinding , byte > ( ) ;
7878
7979 protected List < EventHandler < ConnectionBlockedEventArgs > > m_recordedBlockedEventHandlers =
@@ -416,7 +416,7 @@ public void DeleteRecordedBinding(RecordedBinding rb)
416416 {
417417 lock ( m_recordedEntitiesLock )
418418 {
419- m_recordedBindings . Remove ( rb ) ;
419+ ( ( IDictionary < RecordedBinding , byte > ) m_recordedBindings ) . Remove ( rb ) ;
420420 }
421421 }
422422
@@ -446,7 +446,7 @@ public void DeleteRecordedExchange(string name)
446446 var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
447447 foreach ( RecordedBinding b in bs )
448448 {
449- m_recordedBindings . Remove ( b ) ;
449+ DeleteRecordedBinding ( b ) ;
450450 MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
451451 }
452452 }
@@ -462,7 +462,7 @@ public void DeleteRecordedQueue(string name)
462462 var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
463463 foreach ( RecordedBinding b in bs )
464464 {
465- m_recordedBindings . Remove ( b ) ;
465+ DeleteRecordedBinding ( b ) ;
466466 MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
467467 }
468468 }
@@ -521,7 +521,7 @@ public void RecordBinding(RecordedBinding rb)
521521 {
522522 lock ( m_recordedEntitiesLock )
523523 {
524- m_recordedBindings . Add ( rb , 0 ) ;
524+ m_recordedBindings . TryAdd ( rb , 0 ) ;
525525 }
526526 }
527527
0 commit comments