Skip to content

Commit 22d22b9

Browse files
committed
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 **Auto-cherry-pick to `3.0.x`** Related to #2640
1 parent 0049ce7 commit 22d22b9

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
@@ -1324,7 +1324,7 @@ private void returnToCache(ChannelProxy proxy) {
13241324
catch (InterruptedException ex) {
13251325
Thread.currentThread().interrupt();
13261326
}
1327-
catch (TimeoutException ex) {
1327+
catch (ShutdownSignalException | TimeoutException ex) {
13281328
// The channel didn't handle confirms, so close it altogether to avoid
13291329
// memory leaks for pending confirms
13301330
try {

0 commit comments

Comments
 (0)