From ab124a76d867987f293140cce4271d0da3d7df65 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 16 Oct 2018 16:18:39 +0200 Subject: [PATCH] Discovery: make sure finished is not called twice, even in case of errors --- src/libsync/discovery.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index e53745265b..72264fb291 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1173,6 +1173,7 @@ int ProcessDirectoryJob::processSubJobs(int nbJobs) void ProcessDirectoryJob::dbError() { _discoveryData->fatalError(tr("Error while reading the database")); + _pendingAsyncJobs = -1; // We're finished, we don't want to emit finished again emit finished(); } }