From 18b8292224c1d913e5a774ec07eb66eec4b4cf6a Mon Sep 17 00:00:00 2001 From: Dimitrios Siganos Date: Tue, 11 May 2021 13:16:36 +0100 Subject: [PATCH] Fix for RPC stop command (#3191) 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 1d5f75277e..7c0216b752 100644 --- a/nano/node/json_handler.cpp +++ b/nano/node/json_handler.cpp @@ -3760,7 +3760,6 @@ void nano::json_handler::stop () response_errors (); if (!ec) { - node.stop (); stop_callback (); } }