Merge pull request #4024

5a2864c simplewallet: fix delay when setting auto-refresh off (moneromooo-monero)
This commit is contained in:
luigi1111 2018-08-15 17:05:14 -05:00
commit dd8354aa08
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -1825,6 +1825,7 @@ bool simple_wallet::set_auto_refresh(const std::vector<std::string> &args/* = st
if (pwd_container)
{
parse_bool_and_use(args[1], [&](bool auto_refresh) {
m_auto_refresh_enabled.store(false, std::memory_order_relaxed);
m_wallet->auto_refresh(auto_refresh);
m_idle_mutex.lock();
m_auto_refresh_enabled.store(auto_refresh, std::memory_order_relaxed);