Skip to content

Commit

Permalink
[XNIO-226] Do not resolve host name on socket accept
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Apr 10, 2014
1 parent 486faed commit a1162b3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -142,7 +142,7 @@ public C accept() throws IOException {
return null;
}
final InetSocketAddress peerAddress = tcpConnection.getPeerAddress(InetSocketAddress.class);
final SSLEngine engine = sslContext.createSSLEngine(peerAddress.getHostName(), peerAddress.getPort());
final SSLEngine engine = sslContext.createSSLEngine(peerAddress.isUnresolved() ? peerAddress.getAddress().getHostAddress() : peerAddress.getHostName(), peerAddress.getPort());
final boolean clientMode = useClientMode != 0;
engine.setUseClientMode(clientMode);
if (! clientMode) {
Expand Down

0 comments on commit a1162b3

Please sign in to comment.