Skip to content

Commit 3919ce2

Browse files
Merge branch '4.2.x-stable'
2 parents dddfdaa + 1111ccd commit 3919ce2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,8 @@ RecordedConsumer deleteRecordedConsumer(String consumerTag) {
801801
}
802802

803803
void maybeDeleteRecordedAutoDeleteQueue(String queue) {
804-
synchronized (this.recordedQueues) {
805-
synchronized (this.consumers) {
804+
synchronized (this.consumers) {
805+
synchronized (this.recordedQueues) {
806806
if(!hasMoreConsumersOnQueue(this.consumers.values(), queue)) {
807807
RecordedQueue q = this.recordedQueues.get(queue);
808808
// last consumer on this connection is gone, remove recorded queue
@@ -816,8 +816,8 @@ void maybeDeleteRecordedAutoDeleteQueue(String queue) {
816816
}
817817

818818
void maybeDeleteRecordedAutoDeleteExchange(String exchange) {
819-
synchronized (this.recordedExchanges) {
820-
synchronized (this.consumers) {
819+
synchronized (this.consumers) {
820+
synchronized (this.recordedExchanges) {
821821
if(!hasMoreDestinationsBoundToExchange(Utility.copy(this.recordedBindings), exchange)) {
822822
RecordedExchange x = this.recordedExchanges.get(exchange);
823823
// last binding where this exchange is the source is gone, remove recorded exchange

0 commit comments

Comments
 (0)