Skip to content

Commit ce677bf

Browse files
garyrussellartembilan
authored andcommitted
Ignore AlreadyClosedException in SimpleConnection
**cherry-pick to 2.1.x**
1 parent ecbc388 commit ce677bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/SimpleConnection.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.springframework.amqp.rabbit.support.RabbitExceptionTranslator;
2424
import org.springframework.util.ObjectUtils;
2525

26+
import com.rabbitmq.client.AlreadyClosedException;
2627
import com.rabbitmq.client.BlockedListener;
2728
import com.rabbitmq.client.Channel;
2829
import com.rabbitmq.client.impl.NetworkConnection;
@@ -76,6 +77,9 @@ public void close() {
7677
// let the physical close time out if necessary
7778
this.delegate.close(this.closeTimeout);
7879
}
80+
catch (AlreadyClosedException e) {
81+
// Ignore
82+
}
7983
catch (IOException e) {
8084
throw RabbitExceptionTranslator.convertRabbitAccessException(e);
8185
}

0 commit comments

Comments
 (0)