forked from lthn/blockchain
fixed issue with multithreadin and jwt rpc
This commit is contained in:
parent
423b99cc5e
commit
7a0ec043a1
2 changed files with 4 additions and 0 deletions
|
|
@ -2124,6 +2124,7 @@ bool wallets_manager::on_mw_select_wallet(const tools::wallet_public::COMMAND_MW
|
|||
void wallets_manager::lock()
|
||||
{
|
||||
#ifndef MOBILE_WALLET_BUILD
|
||||
m_select_wallet_rpc_lock.lock();
|
||||
{
|
||||
SHARED_CRITICAL_REGION_LOCAL(m_wallets_lock);
|
||||
auto it = m_wallets.find(m_rpc_selected_wallet_id);
|
||||
|
|
@ -2140,6 +2141,7 @@ void wallets_manager::unlock()
|
|||
{
|
||||
#ifndef MOBILE_WALLET_BUILD
|
||||
m_current_wallet_locked_object.reset();
|
||||
m_select_wallet_rpc_lock.unlock();
|
||||
#endif
|
||||
}
|
||||
std::shared_ptr<tools::wallet2> wallets_manager::get_wallet()
|
||||
|
|
|
|||
|
|
@ -234,6 +234,8 @@ private:
|
|||
std::mutex m_stop_singal_sent_mutex;
|
||||
std::condition_variable m_stop_singal_sent_mutex_cv;
|
||||
|
||||
std::mutex m_select_wallet_rpc_lock;
|
||||
|
||||
view::i_view m_view_stub;
|
||||
view::i_view* m_pview;
|
||||
std::shared_ptr<tools::i_core_proxy> m_rpc_proxy;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue