@@ -75,7 +75,7 @@ public class AutorecoveringConnection : IConnection, IRecoverable
7575
7676 protected List < AutorecoveringModel > m_models = new List < AutorecoveringModel > ( ) ;
7777
78- protected IDictionary < RecordedBinding , byte > m_recordedBindings =
78+ protected ConcurrentDictionary < RecordedBinding , byte > m_recordedBindings =
7979 new ConcurrentDictionary < RecordedBinding , byte > ( ) ;
8080
8181 protected List < EventHandler < ConnectionBlockedEventArgs > > m_recordedBlockedEventHandlers =
@@ -418,7 +418,7 @@ public void DeleteRecordedBinding(RecordedBinding rb)
418418 {
419419 lock ( m_recordedEntitiesLock )
420420 {
421- m_recordedBindings . Remove ( rb ) ;
421+ ( ( IDictionary < RecordedBinding , int > ) m_recordedBindings ) . Remove ( rb ) ;
422422 }
423423 }
424424
@@ -448,7 +448,7 @@ public void DeleteRecordedExchange(string name)
448448 var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
449449 foreach ( RecordedBinding b in bs )
450450 {
451- m_recordedBindings . Remove ( b ) ;
451+ DeleteRecordedBinding ( b ) ;
452452 MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
453453 }
454454 }
@@ -464,7 +464,7 @@ public void DeleteRecordedQueue(string name)
464464 var bs = m_recordedBindings . Keys . Where ( b => name . Equals ( b . Destination ) ) ;
465465 foreach ( RecordedBinding b in bs )
466466 {
467- m_recordedBindings . Remove ( b ) ;
467+ DeleteRecordedBinding ( b ) ;
468468 MaybeDeleteRecordedAutoDeleteExchange ( b . Source ) ;
469469 }
470470 }
@@ -523,7 +523,7 @@ public void RecordBinding(RecordedBinding rb)
523523 {
524524 lock ( m_recordedEntitiesLock )
525525 {
526- m_recordedBindings . Add ( rb , 0 ) ;
526+ m_recordedBindings . TryAdd ( rb , 0 ) ;
527527 }
528528 }
529529
0 commit comments