Skip to content

Commit c25ab6b

Browse files
artembilanspring-builds
authored andcommitted
CCF.CChInvH: physicalClose() on ShutdownSignalException
The `publisherCallbackChannel.waitForConfirms()` may fail with a `ShutdownSignalException` indicating that channel is closed on the broker. So, treat it as a `TimeoutException` and proceed with a `physicalClose()` logic Related to #2640 (cherry picked from commit 22d22b9)
1 parent 74eb58b commit c25ab6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ private void returnToCache(ChannelProxy proxy) {
12711271
catch (InterruptedException ex) {
12721272
Thread.currentThread().interrupt();
12731273
}
1274-
catch (TimeoutException ex) {
1274+
catch (ShutdownSignalException | TimeoutException ex) {
12751275
// The channel didn't handle confirms, so close it altogether to avoid
12761276
// memory leaks for pending confirms
12771277
try {

0 commit comments

Comments
 (0)