http-client-branch: SSL h2 connections not being cached or re-used http-client-branch
authormichaelm
Fri, 01 Dec 2017 09:40:02 +0000
branchhttp-client-branch
changeset 55940 8e09e6396acd
parent 55937 c94a558a70ed
child 55941 2d423c9b73bb
http-client-branch: SSL h2 connections not being cached or re-used
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2ClientImpl.java
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2ClientImpl.java	Thu Nov 30 17:49:29 2017 +0000
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2ClientImpl.java	Fri Dec 01 09:40:02 2017 +0000
@@ -129,6 +129,8 @@
                         Set<CompletableFuture<Http2Connection>> waiters = waiting.remove(key);
                         debug.log(Level.DEBUG, "Opening completed: %s", key);
                         opening.remove(key);
+                        if (t == null && conn != null)
+                            putConnection(conn);
                         final Throwable cause = Utils.getCompletionCause(t);
                         if (waiters == null) {
                             debug.log(Level.DEBUG, "no dependent to wake up");