From 96bbec7ab2de85f26850127619623ef689e39400 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Sun, 21 Jun 2020 21:11:34 +0100 Subject: [PATCH] Restore use of tcpConfiguration method The method wasn't available at first but has been added since to allow being compatible with both Reactor Netty 0.9 and 1.0. See gh-25085 --- .../http/client/reactive/ReactorClientHttpConnector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java index 47d271ddbe1..b001022966d 100644 --- a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java +++ b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java @@ -75,12 +75,13 @@ public class ReactorClientHttpConnector implements ClientHttpConnector { this.httpClient = defaultInitializer.andThen(mapper).apply(initHttpClient(factory)); } + @SuppressWarnings("deprecation") private static HttpClient initHttpClient(ReactorResourceFactory resourceFactory) { ConnectionProvider provider = resourceFactory.getConnectionProvider(); LoopResources resources = resourceFactory.getLoopResources(); Assert.notNull(provider, "No ConnectionProvider: is ReactorResourceFactory not initialized yet?"); Assert.notNull(resources, "No LoopResources: is ReactorResourceFactory not initialized yet?"); - return HttpClient.create(provider).runOn(resources); + return HttpClient.create(provider).tcpConfiguration(tcpClient -> tcpClient.runOn(resources)); } /**