Skip to content

Commit c78108f

Browse files
committed
Revert the fix for AmqpChannelFactoryBean.destroy
https://build.spring.io/browse/INT-SI43X-278 The `AbstractAmqpChannel` is not `DisposableBean` in `4.3.x`
1 parent a74c9ef commit c78108f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/config/AmqpChannelFactoryBean.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ public void stop(Runnable callback) {
500500

501501
@Override
502502
protected void destroyInstance(AbstractAmqpChannel instance) throws Exception {
503-
this.channel.destroy();
503+
if (instance instanceof DisposableBean) {
504+
((DisposableBean) this.channel).destroy();
505+
}
504506
}
505507

506508
}

0 commit comments

Comments
 (0)