diff --git a/source/org/jivesoftware/smack/ConnectionCreationListener.java b/source/org/jivesoftware/smack/ConnectionCreationListener.java index c4c84a683..7cbda1867 100644 --- a/source/org/jivesoftware/smack/ConnectionCreationListener.java +++ b/source/org/jivesoftware/smack/ConnectionCreationListener.java @@ -34,7 +34,7 @@ public interface ConnectionCreationListener { * Notification that a new connection has been created. The new connection * will not yet be connected to the server. * - * @param connection the newly created connection. + * @param connection the newly created connection. */ public void connectionCreated(Connection connection); diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index 65274809d..5b7990388 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -610,7 +610,7 @@ public class XMPPConnection extends Connection { listener.connectionCreated(this); } } - else { + else if (!wasAuthenticated) { packetReader.notifyReconnection(); } @@ -823,7 +823,6 @@ public class XMPPConnection extends Connection { // Verify certificate presented by the server context.init(kms, new javax.net.ssl.TrustManager[]{new ServerTrustManager(getServiceName(), config)}, - //new javax.net.ssl.TrustManager[]{new OpenTrustManager()}, new java.security.SecureRandom()); Socket plain = socket; // Secure the plain connection @@ -995,6 +994,7 @@ public class XMPPConnection extends Connection { login(config.getUsername(), config.getPassword(), config.getResource()); } + packetReader.notifyReconnection(); } catch (XMPPException e) { e.printStackTrace();