SyncEngine::~SyncEngine()
{
abort();
- _excludedFiles.reset();
- csync_destroy(_csync_ctx);
_thread.quit();
_thread.wait();
+ _excludedFiles.reset();
+ csync_destroy(_csync_ctx);
}
//Convert an error code from csync to a user readable string.
void SyncEngine::abort()
{
+ // Sets a flag for the update phase
+ csync_request_abort(_csync_ctx);
qDebug() << Q_FUNC_INFO << _discoveryMainThread;
// Aborts the discovery phase job
if (_discoveryMainThread) {
_discoveryMainThread->abort();
}
- // Sets a flag for the update phase
- csync_request_abort(_csync_ctx);
// For the propagator
if(_propagator) {
_propagator->abort();