diff options
author | Don Sanders <don.sanders@nokia.com> | 2009-05-15 18:35:43 +1000 |
---|---|---|
committer | Don Sanders <don.sanders@nokia.com> | 2009-05-15 18:35:43 +1000 |
commit | 9dfb47145caf4b82bda7235d8cac2c711b083159 (patch) | |
tree | 2c13a42966bcec0682cbc9d80fce1142a3b647b4 | |
parent | b342650113077b26cd9bcb4b9f385107e0b68162 (diff) |
Prevent the connection from being abruptly closed during push email2009W20
operations.
In ImapClient::retrieveOperationCompleted() call deactivateConnection()
which starts the logout timer, before emitting signals like retrievalCompleted()
(rather than after).
If the deactiveConnection() is called afterwards, then the connection
is closed during a retrievalMessageList operation that was started
by the imapservice via a connection to retrievalCompleted() that was
triggered as a result of a (recently added) retrieveFolderList i
operation completing.
May also be useful for QMF clients that do something similar.
-rw-r--r-- | src/plugins/messageservices/imap/imapclient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/messageservices/imap/imapclient.cpp b/src/plugins/messageservices/imap/imapclient.cpp index b700df7f..af239b1a 100644 --- a/src/plugins/messageservices/imap/imapclient.cpp +++ b/src/plugins/messageservices/imap/imapclient.cpp @@ -1028,13 +1028,13 @@ void ImapClient::cancelTransfer() void ImapClient::retrieveOperationCompleted() { + deactivateConnection(); + // This retrieval may have been asynchronous emit allMessagesReceived(); // Or it may have been requested by a waiting client emit retrievalCompleted(); - - deactivateConnection(); } void ImapClient::deactivateConnection() |