diff --git a/Adapter.hxx b/Adapter.hxx index c207d57..02024b4 100644 --- a/Adapter.hxx +++ b/Adapter.hxx @@ -73,6 +73,7 @@ namespace pEp { std::lock_guard lock(m); if (!_sync_thread) { + register_done = false; _sync_thread = new std::thread(sync_thread, obj, _startup, _shutdown); while (!register_done) std::this_thread::sleep_for(std::chrono::milliseconds(100));