From 59e5c760921b8b683ecd4b4f247ab568c6e27385 Mon Sep 17 00:00:00 2001 From: dsiganos Date: Wed, 20 Oct 2021 13:17:09 +0100 Subject: [PATCH] Fix for RPC stop command (#3191) (#3275) The RPC stop command was not working (the node did exit completely) because the stop callback was never called because the callback was called after the node was stopped and the stop callback needed the node to execute. This commit removes the node stop before the callback and let's the stop call back execute, which should stop io_ctx after 3 seconds, which in turn should exit the daemon and the node should be stopped by its destructor. --- nano/node/json_handler.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/nano/node/json_handler.cpp b/nano/node/json_handler.cpp index 4d6ac1c3ab..35593d5768 100644 --- a/nano/node/json_handler.cpp +++ b/nano/node/json_handler.cpp @@ -3826,7 +3826,6 @@ void nano::json_handler::stop () response_errors (); if (!ec) { - node.stop (); stop_callback (); } }