Skip to content

Commit 1a6f981

Browse files
committed
8308185: Update Http2TestServerConnection to use SSLSocket.startHandshake()
Reviewed-by: djelinski
1 parent b300e73 commit 1a6f981

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/jdk/java/net/httpclient/lib/jdk/httpclient/test/lib/http2/Http2TestServerConnection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ private static boolean compareIPAddrs(InetAddress addr1, String host) {
292292

293293
private static void handshake(String name, SSLSocket sock) throws IOException {
294294
if (name == null) {
295-
sock.getSession(); // awaits handshake completion
295+
sock.startHandshake(); // blocks until handshake done
296296
return;
297297
} else if (name.equals("localhost")) {
298298
name = "localhost";
@@ -314,7 +314,7 @@ public boolean matches (SNIServerName n) {
314314
List<SNIMatcher> list = List.of(matcher);
315315
params.setSNIMatchers(list);
316316
sock.setSSLParameters(params);
317-
sock.getSession(); // blocks until handshake done
317+
sock.startHandshake(); // blocks until handshake done
318318
}
319319

320320
void closeIncoming() {

0 commit comments

Comments
 (0)