diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 41c7b4527..25f210b12 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -1453,6 +1453,8 @@ public class XmppConnection implements Runnable { && isSecure) { authenticate(SaslMechanism.Version.SASL); } else if (this.streamFeatures.hasChild("sm", Namespace.STREAM_MANAGEMENT) + && isSecure + && loginInfo != null && streamId != null && !inSmacksSession) { if (Config.EXTENDED_SM_LOGGING) { @@ -1467,7 +1469,9 @@ public class XmppConnection implements Runnable { this.mWaitingForSmCatchup.set(true); this.tagWriter.writeStanzaAsync(resume); } else if (needsBinding) { - if (this.streamFeatures.hasChild("bind", Namespace.BIND) && isSecure) { + if (this.streamFeatures.hasChild("bind", Namespace.BIND) + && isSecure + && loginInfo != null) { sendBindRequest(); } else { Log.d( @@ -1478,7 +1482,6 @@ public class XmppConnection implements Runnable { throw new StateChangingException(Account.State.INCOMPATIBLE_SERVER); } } else { - Log.d( Config.LOGTAG, account.getJid().asBareJid()