Add mutex lock to RPC bootstrap_status (#2383)
This commit is contained in:
parent
e489cf4b28
commit
a7903ba4cc
1 changed files with 2 additions and 0 deletions
|
@ -1669,6 +1669,8 @@ void nano::json_handler::bootstrap_status ()
|
|||
auto attempt (node.bootstrap_initiator.current_attempt ());
|
||||
if (attempt != nullptr)
|
||||
{
|
||||
nano::lock_guard<std::mutex> lock (attempt->mutex);
|
||||
nano::lock_guard<std::mutex> lazy_lock (attempt->lazy_mutex);
|
||||
response_l.put ("clients", std::to_string (attempt->clients.size ()));
|
||||
response_l.put ("pulls", std::to_string (attempt->pulls.size ()));
|
||||
response_l.put ("pulling", std::to_string (attempt->pulling));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue