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.
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";