Skip to content

Commit

Permalink
Close clients sockets on attempt restart
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiySW committed Oct 16, 2019
1 parent d6b796f commit fc0a329
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nano/node/bootstrap/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,13 @@ void nano::bootstrap_attempt::attempt_restart_check (nano::unique_lock<std::mute
if (!confirmed_frontiers)
{
node->stats.inc (nano::stat::type::bootstrap, nano::stat::detail::frontier_confirmation_failed, nano::stat::dir::in);
for (auto i : clients)
{
if (auto client = i.lock ())
{
client->channel->socket->close ();
}
}
run_start (lock_a);
}
}
Expand Down

0 comments on commit fc0a329

Please sign in to comment.