Skip to content

Commit

Permalink
Use Mono.fromDirect for Jetty ReactiveRespnose
Browse files Browse the repository at this point in the history
Closes gh-25849
  • Loading branch information
rstoyanchev committed Oct 2, 2020
1 parent e44b08f commit 2533ba5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public Mono<ClientHttpResponse> connect(HttpMethod method, URI uri,
Request request = this.httpClient.newRequest(uri).method(method.toString());

return requestCallback.apply(new JettyClientHttpRequest(request, this.bufferFactory))
.then(Mono.from(ReactiveRequest.newBuilder(request).build()
.then(Mono.fromDirect(ReactiveRequest.newBuilder(request).build()
.response((reactiveResponse, chunkPublisher) -> {
Flux<DataBuffer> content = Flux.from(chunkPublisher).map(this::toDataBuffer);
return Mono.just(new JettyClientHttpResponse(reactiveResponse, content));
Expand Down

0 comments on commit 2533ba5

Please sign in to comment.