diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index 32228dfdeb36244f4467cc39e9a065ac728fa734..978d2196161308041f3440853c4d51ddd214ffbf 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -1945,11 +1945,6 @@ RingAccount::loadBootstrap() const void RingAccount::trackBuddyPresence(const std::string& buddy_id) { - if (not dht_.isRunning()) { - RING_ERR("[Account %s] Account not running. Cannot track buddy %s", - getAccountID().c_str(), buddy_id.c_str()); - return; - } std::string buddyUri; try { @@ -1969,6 +1964,9 @@ RingAccount::trackBuddyPresence(const std::string& buddy_id) void RingAccount::trackPresence(const dht::InfoHash& h, BuddyInfo& buddy) { + if (not dht_.isRunning()) { + return; + } buddy.listenToken = dht_.listen<DeviceAnnouncement>(h, [this, h](DeviceAnnouncement&& dev, bool expired){ bool wasConnected, isConnected; {