Details
Description
when user use gremlin-driver in private cloud environment,
In AUTHENTICATE rsp func, client need reverse name lookup through DNS, which will take more than 9s in certain env; the calling code slice:
Handler.GremlinSaslAuthenticationHandler.channelRead0 saslClient.set(this.saslClient(this.getHostName(channelHandlerContext))); private String getHostName(final ChannelHandlerContext channelHandlerContext) { return((InetSocketAddress)channelHandlerContext.channel().remoteAddress()).getAddress().getCanonicalHostName(); }
there are many talks about this talks about this question.
https://stackoverflow.com/questions/3193936/how-to-disable-javas-ssl-reverse-dns-lookup
I think we can rewrite the getHostName like this(use getHostAddress):
private String getHostName(final ChannelHandlerContext channelHandlerContext) { return ((InetSocketAddress)channelHandlerContext.channel().remoteAddress()).getAddress().getHostAddress(); }
all versions seed affected