From 9879c7af59c38bf110b9ee859554c419f7eb8479 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 27 Mar 2012 20:52:31 -0700 Subject: [PATCH] Make the XEP-0198 ack debug message less confusing. --- sleekxmpp/plugins/xep_0198/stream_management.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sleekxmpp/plugins/xep_0198/stream_management.py b/sleekxmpp/plugins/xep_0198/stream_management.py index 04aa0001..bc3f5a04 100644 --- a/sleekxmpp/plugins/xep_0198/stream_management.py +++ b/sleekxmpp/plugins/xep_0198/stream_management.py @@ -226,11 +226,15 @@ class XEP_0198(BasePlugin): with self.ack_lock: num_acked = (ack['h'] - self.last_ack) % MAX_SEQ - log.debug("Ack: %s, Last Ack: %s, Num Acked: %s, Unacked: %s", + num_unacked = len(self.unacked_queue) + log.debug("Ack: %s, Last Ack: %s, " + \ + "Unacked: %s, Num Acked: %s, " + \ + "Remaining: %s", ack['h'], self.last_ack, + num_unacked, num_acked, - len(self.unacked_queue)) + num_unacked - num_acked) for x in range(num_acked): seq, stanza = self.unacked_queue.popleft() self.xmpp.event('stanza_acked', stanza)