Skip to content
Commit 743e0cb2 authored by David Faure's avatar David Faure
Browse files

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
parents 99005294 60dbde3c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment