diff --git a/gradle.properties b/gradle.properties index 2211a83..892f571 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ group = org.xbib name = netty-http -version = 4.1.63.2 +version = 4.1.63.3 gradle.wrapper.version = 6.6.1 netty.version = 4.1.63.Final diff --git a/netty-http-client-rest/src/main/java/org/xbib/netty/http/client/rest/RestClient.java b/netty-http-client-rest/src/main/java/org/xbib/netty/http/client/rest/RestClient.java index abd0c7f..f1f0612 100644 --- a/netty-http-client-rest/src/main/java/org/xbib/netty/http/client/rest/RestClient.java +++ b/netty-http-client-rest/src/main/java/org/xbib/netty/http/client/rest/RestClient.java @@ -73,7 +73,8 @@ public class RestClient { requestBuilder.content(byteBuf); } client.newTransport(HttpAddress.http1(url)) - .execute(requestBuilder.setResponseListener(restClient::setResponse).build()).close(); + .execute(requestBuilder.setResponseListener(restClient::setResponse).build()) + .close(); } catch (Exception e) { throw new IOException(e); } diff --git a/netty-http-client/src/main/java/org/xbib/netty/http/client/transport/BaseTransport.java b/netty-http-client/src/main/java/org/xbib/netty/http/client/transport/BaseTransport.java index c98fa37..ff2a948 100644 --- a/netty-http-client/src/main/java/org/xbib/netty/http/client/transport/BaseTransport.java +++ b/netty-http-client/src/main/java/org/xbib/netty/http/client/transport/BaseTransport.java @@ -94,6 +94,7 @@ public abstract class BaseTransport implements ClientTransport { } else { completableFuture.cancel(true); } + close(); }); execute(request); return completableFuture; @@ -101,7 +102,6 @@ public abstract class BaseTransport implements ClientTransport { @Override public void close() { - // channels are present, maybe forgot a get() to receive responses? get(); cancel(); }