diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java index c946f9c33a..65a63e5337 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java @@ -625,7 +625,7 @@ public class NettyConnector extends AbstractConnector { @Override public SSLEngine run() { if (verifyHost) { - return context.createSSLEngine(host, port); + return context.createSSLEngine(sniHost != null ? sniHost : host, port); } else { return context.createSSLEngine(); }