From 9fc930230acb28cb64fb0cb6bf9d197742ee72c6 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Sun, 24 May 2020 14:59:55 +0200 Subject: [PATCH] got rid of delay before first update of wallet info --- src/wallet/wallets_manager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 6a79ebef..48213fce 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -643,14 +643,15 @@ void wallets_manager::loop() while (!m_stop_singal_sent) { - { - std::unique_lock lk(m_stop_singal_sent_mutex); - m_stop_singal_sent_mutex_cv.wait_for(lk, std::chrono::microseconds(DAEMON_IDLE_UPDATE_TIME_MS), [&] {return m_stop_singal_sent.load(); }); - } if (!m_stop_singal_sent) { update_state_info(); } + { + std::unique_lock lk(m_stop_singal_sent_mutex); + m_stop_singal_sent_mutex_cv.wait_for(lk, std::chrono::microseconds(DAEMON_IDLE_UPDATE_TIME_MS), [&] {return m_stop_singal_sent.load(); }); + } + } // while(!m_stop_singal_sent)