From 43619de7aa13364fdf08dbe7d6fd01fc078eee1e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 31 Jan 2013 22:31:31 +0000 Subject: [PATCH] SMACK-377 Avoid an unnecessary DNS request by using directly the, at this point known IP, instead of using the hostname as argument for the new socket. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13420 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index cd4f79e50..b91aba3da 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -832,7 +832,7 @@ public class XMPPConnection extends Connection { Socket plain = socket; // Secure the plain connection socket = context.getSocketFactory().createSocket(plain, - plain.getInetAddress().getHostName(), plain.getPort(), true); + plain.getInetAddress().getHostAddress(), plain.getPort(), true); socket.setSoTimeout(0); socket.setKeepAlive(true); // Initialize the reader and writer with the new secured version