log number of unhandled iq callbacks after resume

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 7 ++--
1 file changed, 4 insertions(+), 3 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java 🔗

@@ -591,10 +591,11 @@ public class XmppConnection implements Runnable {
                 boolean accountUiNeedsRefresh = false;
                 synchronized (NotificationService.CATCHUP_LOCK) {
                     if (mWaitingForSmCatchup.compareAndSet(true, false)) {
-                        int count = mSmCatchupMessageCounter.get();
-                        Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": SM catchup complete (" + count + ")");
+                        final int messageCount = mSmCatchupMessageCounter.get();
+                        final int pendingIQs = packetCallbacks.size();
+                        Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": SM catchup complete (messages=" + messageCount + ", pending IQs="+pendingIQs+")");
                         accountUiNeedsRefresh = true;
-                        if (count > 0) {
+                        if (messageCount > 0) {
                             mXmppConnectionService.getNotificationService().finishBacklog(true, account);
                         }
                     }