Commit 9bd25cdd authored by Adrien Béraud's avatar Adrien Béraud

jamiaccount: register on main thread

Change-Id: Iafca382f1b76ae3c77fc3613315c0f664647bdf6
parent a87f8e92
......@@ -1652,8 +1652,12 @@ JamiAccount::registerAsyncOps()
{
auto onLoad = [this, loaded = std::make_shared<std::atomic_uint>()]{
if (++(*loaded) == 2u) {
std::lock_guard<std::mutex> lock(configurationMutex_);
doRegister_();
runOnMainThread([w = weak()]{
if (auto s = w.lock()) {
std::lock_guard<std::mutex> lock(s->configurationMutex_);
s->doRegister_();
}
});
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment