From 0b18a4b9db7a8d61165c13e90f41253a3a8ba69e Mon Sep 17 00:00:00 2001 From: Guilherme Lawless Date: Tue, 15 Oct 2019 14:27:02 +0100 Subject: [PATCH] Fix ongoing unchecked cleanup (#2342) --- nano/node/bootstrap/bootstrap.cpp | 5 ++++- nano/node/node.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nano/node/bootstrap/bootstrap.cpp b/nano/node/bootstrap/bootstrap.cpp index e1594720..22fa46c7 100644 --- a/nano/node/bootstrap/bootstrap.cpp +++ b/nano/node/bootstrap/bootstrap.cpp @@ -259,7 +259,10 @@ void nano::bootstrap_attempt::run () lazy_run (); lock.lock (); } - node->unchecked_cleanup (); + if (!stopped) + { + node->unchecked_cleanup (); + } } stopped = true; condition.notify_all (); diff --git a/nano/node/node.cpp b/nano/node/node.cpp index 8ffa50d7..d0b2969f 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -651,7 +651,7 @@ void nano::node::start () { ongoing_bootstrap (); } - else if (!flags.disable_unchecked_cleanup) + if (!flags.disable_unchecked_cleanup) { auto this_l (shared ()); worker.push_task ([this_l]() {