IMAP resource: fix data loss on connection lost, depending on the current task
Summary: If the current task is e.g. uploading an item to the server, we don't want to cancelTask (which means give up and never try again), we want to deferTask, so we try again later. Otherwise, well, this is how we end up with items without a remote id, which makes syncing that folder much slower every time due to the item count mismatch. Abstracted with a new method abortTask, which calls cancel or defer depending on the type of task. Test Plan: Sync large folder in kmail, abort sync. But I didn't test any of the task types other than collection sync... Reviewers: dvratil Reviewed By: dvratil Subscribers: #kde_pim Tags: #kde_pim Differential Revision: https://phabricator.kde.org/D12427
Please register or sign in to comment