diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 9063cca4..ae11a3bf 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -750,13 +750,13 @@ public class XmppConnection implements Runnable { while (iterator.hasNext()) { Pair entry = iterator.next(); callbacks.add(entry.second); + iterator.remove(); } - this.packetCallbacks.clear(); } for(OnIqPacketReceived callback : callbacks) { callback.onIqPacketReceived(account,failurePacket); } - Log.d(Config.LOGTAG,account.getJid().toBareJid()+": done clearing iq callbacks"); + Log.d(Config.LOGTAG,account.getJid().toBareJid()+": done clearing iq callbacks. "+this.packetCallbacks.size()+" left"); } private void sendStartSession() {