diff -r 65bd0b92abec -r 907bddce488c src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java Fri Dec 08 12:35:49 2017 +0300 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java Mon Dec 11 16:43:11 2017 +0000 @@ -427,6 +427,10 @@ // P indicates proxy // Eg: "S:H:foo.com:80" static String keyString(boolean secure, boolean proxy, String host, int port) { + if (secure && port == -1) + port = 443; + else if (!secure && port == -1) + port = 80; return (secure ? "S:" : "C:") + (proxy ? "P:" : "H:") + host + ":" + port; } @@ -434,8 +438,8 @@ return this.key; } - void putConnection() { - client2.putConnection(this); + boolean offerConnection() { + return client2.offerConnection(this); } private HttpPublisher publisher() {