Skip to content

Commit

Permalink
ReleasableResource used
Browse files Browse the repository at this point in the history
Signed-off-by: David Kral <[email protected]>
  • Loading branch information
Verdent committed Sep 21, 2023
1 parent 3a9c14a commit 3dde247
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private Http2ClientResponseImpl invokeWithServices(Http2CallChainBase callChain,
serviceResponse.inputStream().orElse(null),
mediaContext(),
resolvedUri,
(Http2ClientStream) serviceResponse.connection(),
serviceResponse.connection(),
complete,
callChain::closeResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
import io.helidon.webclient.api.ClientResponseEntity;
import io.helidon.webclient.api.ClientUri;
import io.helidon.webclient.api.HttpClientConfig;
import io.helidon.webclient.api.ReleasableResource;

class Http2ClientResponseImpl implements Http2ClientResponse {
private final HttpClientConfig httpClientConfig;
private final Status responseStatus;
private final ClientRequestHeaders requestHeaders;
private final ClientResponseHeaders responseHeaders;
private final Http2ClientStream stream;
private final ReleasableResource stream;
private final CompletableFuture<Void> complete;
private final Runnable closeResponseRunnable;
private final CompletableFuture<ClientResponseTrailers> responseTrailers;
Expand All @@ -60,7 +61,7 @@ class Http2ClientResponseImpl implements Http2ClientResponse {
InputStream inputStream, // input stream is nullable - no response entity
MediaContext mediaContext,
ClientUri lastEndpointUri,
Http2ClientStream stream,
ReleasableResource stream,
CompletableFuture<Void> complete,
Runnable closeResponseRunnable) {
this.httpClientConfig = httpClientConfig;
Expand Down Expand Up @@ -129,7 +130,7 @@ public ReadableEntity entity() {
}

Http2ClientStream stream() {
return stream;
return (Http2ClientStream) stream;
}

private BufferData readBytes(int estimate) {
Expand Down

0 comments on commit 3dde247

Please sign in to comment.