diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java index 21e8af0a626..99d552c6ad7 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java @@ -1560,13 +1560,6 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable * If the given {@code address} is null, it is equivalent to {@link #newSSLEngine()}, otherwise * {@link #newSSLEngine(String, int)} is called. *
- * If {@link #getNeedClientAuth()} is {@code true}, then the host name is passed to - * {@link #newSSLEngine(String, int)}, possibly incurring in a reverse DNS lookup, which takes time - * and may hang the selector (since this method is usually called by the selector thread). - *
- * Otherwise, the host address is passed to {@link #newSSLEngine(String, int)} without DNS lookup - * penalties. - *
* Clients that wish to create {@link SSLEngine} instances must use {@link #newSSLEngine(String, int)}. * * @param address the remote peer address @@ -1576,10 +1569,7 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable { if (address == null) return newSSLEngine(); - - boolean useHostName = getNeedClientAuth(); - String hostName = useHostName ? address.getHostName() : address.getAddress().getHostAddress(); - return newSSLEngine(hostName, address.getPort()); + return newSSLEngine(address.getHostString(), address.getPort()); } /**