Merge pull request #4845 from k9mail/drop_failing_commands

Remove failed pending commands
This commit is contained in:
cketti 2020-06-19 21:40:15 +02:00 committed by GitHub
commit 9b0cf36c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -730,8 +730,19 @@ public class MessagingController {
} else {
throw me;
}
} catch (Exception e) {
Timber.e("Unexpected exception with command '%s', removing command from queue", command);
localStore.removePendingCommand(processingCommand);
if (K9.DEVELOPER_MODE) {
throw new AssertionError("Unexpected exception while processing pending command", e);
}
}
// TODO: When removing a pending command due to an error the local changes should be reverted. Pending
// commands that depend on this command should be canceled and local changes be reverted. In most cases
// the user should be notified about the failure as well.
}
} catch (MessagingException me) {
notifyUserIfCertificateProblem(account, me, true);
Timber.e(me, "Could not process command '%s'", processingCommand);