From da5a4a808ccc3ad6ae7c4b1d9df5e379ce325e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Mon, 6 May 2024 16:16:30 +0200 Subject: [PATCH] Ascendboot stop --- nano/node/bootstrap_ascending/service.cpp | 7 ++++--- nano/node/node.cpp | 5 +---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/nano/node/bootstrap_ascending/service.cpp b/nano/node/bootstrap_ascending/service.cpp index d3484994..b0ee33dc 100644 --- a/nano/node/bootstrap_ascending/service.cpp +++ b/nano/node/bootstrap_ascending/service.cpp @@ -73,9 +73,10 @@ void nano::bootstrap_ascending::service::start () void nano::bootstrap_ascending::service::stop () { - nano::unique_lock lock{ mutex }; - stopped = true; - lock.unlock (); + { + nano::lock_guard lock{ mutex }; + stopped = true; + } condition.notify_all (); nano::join_or_pass (thread); nano::join_or_pass (timeout_thread); diff --git a/nano/node/node.cpp b/nano/node/node.cpp index 9fe06bfd..58ec072d 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -745,10 +745,7 @@ void nano::node::stop () // No tasks may wait for work generation in I/O threads, or termination signal capturing will be unable to call node::stop() distributed_work.stop (); backlog.stop (); - if (!flags.disable_ascending_bootstrap) - { - ascendboot.stop (); - } + ascendboot.stop (); rep_crawler.stop (); unchecked.stop (); block_processor.stop ();