diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index 8118ac5966e92b7a24a08a6f4afdf950e2bc7d16..c3c0e28be49b7a9f9b47fdc7f819af3af7bf3d92 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -2189,7 +2189,7 @@ JamiAccount::doRegister_() if (accountManager_->getInfo()->deviceId == deviceId) return; - std::lock_guard<std::mutex> lk(connManagerMtx_); + std::unique_lock<std::mutex> lk(connManagerMtx_); if (!connectionManager_) connectionManager_ = std::make_unique<ConnectionManager>(*this); auto channelName = "sync://" + deviceId; @@ -2206,6 +2206,10 @@ JamiAccount::doRegister_() if (socket) syncWith(deviceId, socket); }); + lk.unlock(); + requestSIPConnection( + getUsername(), + crt->getLongId()); // For git notifications, will use the same socket as sync }, [this] { deviceAnnounced_ = true;