[Pkg-owncloud-commits] [owncloud-client] 68/121: Fix a deadlock when shutting down during discovery (#4993)

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Jul 28 15:31:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 622017adcf3b1a914221acc0bb2c17e1429ea4c3
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Mon Jun 27 16:12:39 2016 +0200

    Fix a deadlock when shutting down during discovery (#4993)
    
    Since the SyncEngine now quits and waits for the discovery thread,
    the main thread can enter a deadlock where the discovery thread waits
    for its directory result.
    
    Add a 2 seconds timer to the discovery thread wait condition
    to limit the deadlock time.
---
 src/libsync/discoveryphase.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp
index c85fe2d..52a454e 100644
--- a/src/libsync/discoveryphase.cpp
+++ b/src/libsync/discoveryphase.cpp
@@ -564,7 +564,7 @@ csync_vio_handle_t* DiscoveryJob::remote_vio_opendir_hook (const char *url,
         discoveryJob->_vioMutex.lock();
         const QString qurl = QString::fromUtf8(url);
         emit discoveryJob->doOpendirSignal(qurl, directoryResult.data());
-        discoveryJob->_vioWaitCondition.wait(&discoveryJob->_vioMutex, ULONG_MAX); // FIXME timeout?
+        discoveryJob->_vioWaitCondition.wait(&discoveryJob->_vioMutex, 30000);
         discoveryJob->_vioMutex.unlock();
 
         qDebug() << discoveryJob << url << "...Returned from main thread";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list