From 1145c46e362c3608906c0cf548e64a96c8592af8 Mon Sep 17 00:00:00 2001 From: clemahieu Date: Tue, 20 Jun 2017 13:25:53 -0500 Subject: [PATCH] Dequeue idle connections even if there's no action in order to get proper disconnection. --- rai/node/bootstrap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rai/node/bootstrap.cpp b/rai/node/bootstrap.cpp index ecafaece..2484de7c 100755 --- a/rai/node/bootstrap.cpp +++ b/rai/node/bootstrap.cpp @@ -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 (); } } }