Skip to content

Commit cf6f2d6

Browse files
committed
GH-10018: Fix bugs from the previous commit
Related to: #10018
1 parent bd4e041 commit cf6f2d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayMessageHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import org.springframework.beans.factory.BeanCreationException;
2626
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
27+
import org.springframework.core.task.SimpleAsyncTaskExecutor;
2728
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
2829
import org.springframework.integration.support.management.ManageableLifecycle;
2930
import org.springframework.lang.Nullable;
@@ -66,7 +67,7 @@ public class GatewayMessageHandler extends AbstractReplyProducingMessageHandler
6667

6768
private boolean errorOnTimeout;
6869

69-
private Executor executor;
70+
private Executor executor = new SimpleAsyncTaskExecutor();
7071

7172
public void setRequestChannel(MessageChannel requestChannel) {
7273
this.requestChannel = requestChannel;
@@ -147,6 +148,7 @@ private void initialize() {
147148
this.gatewayProxyFactoryBean.setDefaultReplyChannelName(this.replyChannelName);
148149
this.gatewayProxyFactoryBean.setErrorChannel(this.errorChannel);
149150
this.gatewayProxyFactoryBean.setErrorChannelName(this.errorChannelName);
151+
this.gatewayProxyFactoryBean.setErrorOnTimeout(this.errorOnTimeout);
150152
this.gatewayProxyFactoryBean.setAsyncExecutor(this.executor);
151153
if (this.requestTimeout != null) {
152154
this.gatewayProxyFactoryBean.setDefaultRequestTimeout(this.requestTimeout);

0 commit comments

Comments
 (0)