Always erase ending connections from active or connecting pool.
This commit is contained in:
parent
61cd491296
commit
79b2a530c4
1 changed files with 6 additions and 9 deletions
|
@ -874,17 +874,14 @@ void rai::bootstrap_attempt::pool_connection (std::shared_ptr <rai::bootstrap_cl
|
|||
|
||||
void rai::bootstrap_attempt::connection_ending (rai::bootstrap_client * client_a)
|
||||
{
|
||||
if (state != rai::attempt_state::complete)
|
||||
std::lock_guard <std::mutex> lock (mutex);
|
||||
if (!client_a->pull_client.pull.account.is_zero ())
|
||||
{
|
||||
std::lock_guard <std::mutex> lock (mutex);
|
||||
if (!client_a->pull_client.pull.account.is_zero ())
|
||||
{
|
||||
// If this connection is ending and request_account hasn't been cleared it didn't finish, requeue
|
||||
requeue_pull (client_a->pull_client.pull);
|
||||
}
|
||||
auto erased_connecting (connecting.erase (client_a));
|
||||
auto erased_active (active.erase (client_a));
|
||||
// If this connection is ending and request_account hasn't been cleared it didn't finish, requeue
|
||||
requeue_pull (client_a->pull_client.pull);
|
||||
}
|
||||
auto erased_connecting (connecting.erase (client_a));
|
||||
auto erased_active (active.erase (client_a));
|
||||
}
|
||||
|
||||
void rai::bootstrap_attempt::completed_requests (std::shared_ptr <rai::bootstrap_client> client_a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue