Dequeue idle connections even if there's no action in order to get proper disconnection.

This commit is contained in:
clemahieu 2017-06-20 13:25:53 -05:00
commit 1145c46e36

View file

@ -944,6 +944,7 @@ void rai::bootstrap_attempt::dispatch_work ()
{
// We have a connection we could do something with
auto connection (idle.back ());
idle.pop_back ();
switch (state)
{
case rai::attempt_state::starting:
@ -997,7 +998,6 @@ void rai::bootstrap_attempt::dispatch_work ()
{
// If there's an action, move the connection from idle to active.
active [connection.get ()] = connection;
idle.pop_back ();
}
}
}