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.
This commit is contained in:
parent
69edd4ac50
commit
1a883b863d
|
|
@ -38,12 +38,6 @@ import org.springframework.http.HttpMethod;
|
|||
*/
|
||||
public class ReactorClientHttpConnector implements ClientHttpConnector {
|
||||
|
||||
private static final Mono<ClientHttpResponse> 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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue