From 1a883b863d3732843c0cb83316d60e45161f0ae6 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 8 Sep 2017 10:27:35 +0200 Subject: [PATCH] Remove temporary workaround for reactor-netty client Now that https://github.com/reactor/reactor-netty/issues/138 is solved, this commit removes the temporary workaround introduced in SPR-15784 but leaves the general mechanism for detecting empty responses. --- .../http/client/reactive/ReactorClientHttpConnector.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 ad3f8c0b1c..2ee616b1fa 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 @@ -38,12 +38,6 @@ import org.springframework.http.HttpMethod; */ public class ReactorClientHttpConnector implements ClientHttpConnector { - private static final Mono NO_CLIENT_RESPONSE_ERROR = Mono.error( - new IllegalStateException("HttpClient completed without a response. " + - "As a temporary workaround try to disable connection pool. " + - "See https://github.com/reactor/reactor-netty/issues/138.")); - - private final HttpClient httpClient; @@ -78,8 +72,7 @@ public class ReactorClientHttpConnector implements ClientHttpConnector { .request(adaptHttpMethod(method), uri.toString(), request -> requestCallback.apply(adaptRequest(method, uri, request))) - .map(this::adaptResponse) - .switchIfEmpty(NO_CLIENT_RESPONSE_ERROR); + .map(this::adaptResponse); } private io.netty.handler.codec.http.HttpMethod adaptHttpMethod(HttpMethod method) {