diff options
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r-- | common/synchronizer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index 3ef7eb7..b1ff29c 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp | |||
@@ -629,11 +629,14 @@ KAsync::Job<void> Synchronizer::replay(const QByteArray &type, const QByteArray | |||
629 | } | 629 | } |
630 | }) | 630 | }) |
631 | .then([this](const KAsync::Error &error) { | 631 | .then([this](const KAsync::Error &error) { |
632 | //We need to commit here otherwise the next change-replay step will abort the transaction | ||
633 | mSyncStore.clear(); | ||
634 | mSyncTransaction.commit(); | ||
632 | if (error) { | 635 | if (error) { |
633 | SinkWarningCtx(mLogCtx) << "Failed to replay change: " << error.errorMessage; | 636 | SinkWarningCtx(mLogCtx) << "Failed to replay change: " << error.errorMessage; |
637 | return KAsync::error(error); | ||
634 | } | 638 | } |
635 | mSyncStore.clear(); | 639 | return KAsync::null(); |
636 | mSyncTransaction.commit(); | ||
637 | }); | 640 | }); |
638 | } | 641 | } |
639 | 642 | ||