mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
Syncengine: Wait for the neon thead to be finished before destroying the Propagator and calling csync_commit
The legacy job might still need the neon session and the propagator. We need to make sure the thread exits before. This fixes crash when pausing a sync made with the legacy jobs (for example when there is network limitation) This should fix https://github.com/owncloud/enterprise/issues/200
This commit is contained in:
parent
0a953b91f9
commit
0880444e37
1 changed files with 2 additions and 2 deletions
|
@ -663,14 +663,14 @@ void SyncEngine::slotFinished()
|
|||
|
||||
void SyncEngine::finalize()
|
||||
{
|
||||
_thread.quit();
|
||||
_thread.wait();
|
||||
csync_commit(_csync_ctx);
|
||||
|
||||
qDebug() << "CSync run took " << _stopWatch.addLapTime(QLatin1String("Sync Finished"));
|
||||
_stopWatch.stop();
|
||||
|
||||
_propagator.reset(0);
|
||||
_thread.quit();
|
||||
_thread.wait();
|
||||
_syncRunning = false;
|
||||
emit finished();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue