From 9db1529e60cadff872cd3066e837e15413216b71 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 25 Jun 2015 09:42:25 -0400 Subject: [bug] saving message to drafts folder hangs the bug consist on a fetch-while-pending-inserts hanging. the pending insert dict was not being cleaned up because the lookup for the Message-Id *is* case-sensitive (in the headers dict). by using a temporary all-keys-lowercase dict the lookup can be performed right, and the fetch returns successfully. at this point there's still a pending bug with Drafts, and it is that the new version is inserted but the MUA (TB) doesn't hide the older version (although a Delete flag is added). Resolves: #7189, #7190 Releases: 0.4.0 --- src/leap/mail/imap/mailbox.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/leap/mail/imap') diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py index c4821ff..72f5a43 100644 --- a/src/leap/mail/imap/mailbox.py +++ b/src/leap/mail/imap/mailbox.py @@ -504,8 +504,13 @@ class IMAPMailbox(object): getimapmsg = self.get_imap_message def get_imap_messages_for_range(msg_range): + print + print + print + print "GETTING FOR RANGE", msg_range def _get_imap_msg(messages): + print "GETTING IMAP MSG FOR", messages d_imapmsg = [] for msg in messages: d_imapmsg.append(getimapmsg(msg)) @@ -532,6 +537,7 @@ class IMAPMailbox(object): d = defer.gatherResults(d_msg, consumeErrors=True) d.addCallback(_get_imap_msg) d.addCallback(_zip_msgid) + d.addErrback(lambda failure: log.err(failure)) return d # for sequence numbers (uid = 0) @@ -542,6 +548,7 @@ class IMAPMailbox(object): else: d = self._get_messages_range(messages_asked) d.addCallback(get_imap_messages_for_range) + d.addErrback(lambda failure: log.err(failure)) return d -- cgit v1.2.3