aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-08-23 10:20:29 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-08-23 10:20:29 +0200
commit3d6fb9b21d41728a56e56b53901b080815805265 (patch)
treefd12b3ba379ad905b52f6ddbcf3057705ae86a39 /src/main/java/eu/siacs
parent1688b659654cb1f3f5d4e20e6e238aa15fe60c96 (diff)
remove callbacks directly from iterator
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java4
1 files 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 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<IqPacket, OnIqPacketReceived> 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() {