From cac577fa4e0d291981105033d539ece474e16373 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 8 Aug 2015 10:26:36 +0200 Subject: [PATCH] don't request ack for iq stanzas before stream managment is initialized fixes #1322 --- src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 0ed6e622b..bf89ba816 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -951,7 +951,7 @@ public class XmppConnection implements Runnable { ++stanzasSent; } tagWriter.writeStanzaAsync(packet); - if ((packet instanceof MessagePacket || packet instanceof IqPacket) && packet.getId() != null && getFeatures().sm()) { + if ((packet instanceof MessagePacket || packet instanceof IqPacket) && packet.getId() != null && this.streamId != null) { if (Config.EXTENDED_SM_LOGGING) { Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": requesting ack for stanza #" + stanzasSent); } @@ -1024,7 +1024,7 @@ public class XmppConnection implements Runnable { if (tagWriter.isActive()) { tagWriter.finish(); try { - while (!tagWriter.finished()) { + while (!tagWriter.finished() && socket.isConnected()) { Log.d(Config.LOGTAG, "not yet finished"); Thread.sleep(100); }