From 66aacf7e3edae1e4a6ec6cab72df82ae38daa096 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 May 2014 21:57:44 +0200 Subject: sending session after unsucesfull session resume. fixed #116 --- src/eu/siacs/conversations/xmpp/XmppConnection.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/eu/siacs/conversations/xmpp') diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index a04105a8f..6e55ebfec 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -542,13 +542,6 @@ public class XmppConnection implements Runnable { this.tagWriter.writeStanzaAsync(resume); } else if (this.streamFeatures.hasChild("bind") && shouldBind) { sendBindRequest(); - if (this.streamFeatures.hasChild("session")) { - Log.d(LOGTAG,account.getJid()+": sending deprecated session"); - IqPacket startSession = new IqPacket(IqPacket.TYPE_SET); - startSession.addChild("session","urn:ietf:params:xml:ns:xmpp-session"); //setContent("") - startSession.setId(nextRandomId()); - this.sendPacket(startSession, null); - } } } @@ -655,9 +648,17 @@ public class XmppConnection implements Runnable { if (bindListener !=null) { bindListener.onBind(account); } + changeStatus(Account.STATUS_ONLINE); } }); + if (this.streamFeatures.hasChild("session")) { + Log.d(LOGTAG,account.getJid()+": sending deprecated session"); + IqPacket startSession = new IqPacket(IqPacket.TYPE_SET); + startSession.addChild("session","urn:ietf:params:xml:ns:xmpp-session"); //setContent("") + startSession.setId(nextRandomId()); + this.sendPacket(startSession, null); + } } private void sendServiceDiscoveryInfo(final String server) { -- cgit v1.2.3