Possible fix for "shutdown problem".

Tests added in last commit (startup/shutdown repeatedly) now seem to work better, but still fail on iteration 61, with a different problem.
sync
heck 3 years ago
parent 0e4f4475c4
commit 723b6b1829

@ -55,8 +55,17 @@ namespace pEp {
}
if (ev == nullptr) {
if (!on_sync_thread()) {
_sync_thread->join();
q.clear();
if(_sync_thread->joinable()) {
pEpLog("Waiting for Sync thread to join...");
_sync_thread->join();
delete _sync_thread;
_sync_thread = nullptr;
pEpLog("...thread joined");
q.clear();
} else {
//FATAL
pEpLog("FATAL: sync thread not joinable/detached");
}
}
}
return 0;

Loading…
Cancel
Save