diff --git a/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/StreamingConnectionFactory.java b/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/StreamingConnectionFactory.java index d9acd2ae58..effae5b553 100644 --- a/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/StreamingConnectionFactory.java +++ b/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/StreamingConnectionFactory.java @@ -95,7 +95,8 @@ static ReadOnlyTcpClientConfig withSslConfigPeerHost(Object resolvedRemoteAddres if (sniHostname == null) { if (peerHost == null) { newPeerHost = toHostAddress(inetAddress); - newSniHostname = hostnameVerificationAlgorithm = null; + newSniHostname = null; + hostnameVerificationAlgorithm = ""; } else { newPeerHost = peerHost + '-' + toHostAddress(inetAddress); // We are overriding the peerHost to make it qualified with the resolved address. If sniHostname is @@ -105,7 +106,8 @@ static ReadOnlyTcpClientConfig withSslConfigPeerHost(Object resolvedRemoteAddres newSniHostname = peerHost; hostnameVerificationAlgorithm = sslConfig.hostnameVerificationAlgorithm(); } else { - newSniHostname = hostnameVerificationAlgorithm = null; + newSniHostname = null; + hostnameVerificationAlgorithm = ""; } } } else {