diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttpAsyncRedirectsTest.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttpAsyncRedirectsTest.java index 9f5e72252..a1673c417 100644 --- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttpAsyncRedirectsTest.java +++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttpAsyncRedirectsTest.java @@ -687,7 +687,7 @@ public abstract class AbstractHttpAsyncRedirectsTest () { diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractServerTestBase.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractServerTestBase.java index 98eea6b3b..49671bd06 100644 --- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractServerTestBase.java +++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractServerTestBase.java @@ -64,7 +64,7 @@ public abstract class AbstractServerTestBase { IOReactorConfig.custom() .setSoTimeout(TIMEOUT) .build(), - scheme == URIScheme.HTTPS ? SSLTestContexts.createServerSSLContext() : null); + scheme == URIScheme.HTTPS ? SSLTestContexts.createServerSSLContext() : null, null, null); server.register("/echo/*", new Supplier() { @Override diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.java index de9207539..65b7f67d5 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.java @@ -149,7 +149,7 @@ class InternalH2AsyncExecRuntime implements AsyncExecRuntime { public boolean validateConnection() { if (reusable) { final Endpoint endpoint = sessionRef.get(); - return endpoint != null && !endpoint.session.isClosed(); + return endpoint != null && endpoint.session.isOpen(); } final Endpoint endpoint = sessionRef.getAndSet(null); if (endpoint != null) { @@ -161,7 +161,7 @@ class InternalH2AsyncExecRuntime implements AsyncExecRuntime { @Override public boolean isEndpointConnected() { final Endpoint endpoint = sessionRef.get(); - return endpoint != null && !endpoint.session.isClosed(); + return endpoint != null && endpoint.session.isOpen(); } @@ -178,7 +178,7 @@ class InternalH2AsyncExecRuntime implements AsyncExecRuntime { final HttpClientContext context, final FutureCallback callback) { final Endpoint endpoint = ensureValid(); - if (!endpoint.session.isClosed()) { + if (endpoint.session.isOpen()) { callback.completed(this); return Operations.nonCancellable(); } @@ -227,7 +227,7 @@ class InternalH2AsyncExecRuntime implements AsyncExecRuntime { final ComplexCancellable complexCancellable = new ComplexCancellable(); final Endpoint endpoint = ensureValid(); final IOSession session = endpoint.session; - if (!session.isClosed()) { + if (session.isOpen()) { if (log.isDebugEnabled()) { log.debug(ConnPoolSupport.getId(endpoint) + ": start execution " + id); } diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/LoggingIOSession.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/LoggingIOSession.java index ebf515bfc..9156915d3 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/LoggingIOSession.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/LoggingIOSession.java @@ -176,11 +176,6 @@ class LoggingIOSession implements ProtocolIOSession { return this.session.getStatus(); } - @Override - public boolean isClosed() { - return this.session.isClosed(); - } - @Override public void close(final CloseMode closeMode) { if (this.log.isDebugEnabled()) { diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/DefaultManagedAsyncClientConnection.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/DefaultManagedAsyncClientConnection.java index e8836380d..a2bda688e 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/DefaultManagedAsyncClientConnection.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/DefaultManagedAsyncClientConnection.java @@ -97,7 +97,7 @@ final class DefaultManagedAsyncClientConnection implements ManagedAsyncClientCon @Override public boolean isOpen() { - return !ioSession.isClosed(); + return ioSession.isOpen(); } @Override diff --git a/pom.xml b/pom.xml index 92d85d34e..9b55225fc 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ 1.7 1.7 - 5.0-beta9 + 5.0-beta10 2.9.1 1.13 1.4.1