Skip to content

Commit b2db10a

Browse files
Merge branch 'stable'
2 parents b1967e5 + 59d36cd commit b2db10a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/com/rabbitmq/client/impl/recovery/AutorecoveringConnection.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,10 @@ synchronized void recordQueueBinding(AutorecoveringChannel ch,
638638
destination(queue).
639639
routingKey(routingKey).
640640
arguments(arguments);
641-
if (!this.recordedBindings.contains(binding)) {
642-
this.recordedBindings.add(binding);
641+
if (this.recordedBindings.contains(binding)) {
642+
this.recordedBindings.remove(binding);
643643
}
644+
this.recordedBindings.add(binding);
644645
}
645646

646647
synchronized boolean deleteRecordedQueueBinding(AutorecoveringChannel ch,
@@ -666,6 +667,9 @@ synchronized void recordExchangeBinding(AutorecoveringChannel ch,
666667
destination(destination).
667668
routingKey(routingKey).
668669
arguments(arguments);
670+
if (this.recordedBindings.contains(binding)) {
671+
this.recordedBindings.remove(binding);
672+
}
669673
this.recordedBindings.add(binding);
670674
}
671675

0 commit comments

Comments
 (0)