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.
This commit is contained in:
dsiganos 2021-10-20 13:17:09 +01:00 committed by GitHub
commit 59e5c76092
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3826,7 +3826,6 @@ void nano::json_handler::stop ()
response_errors (); response_errors ();
if (!ec) if (!ec)
{ {
node.stop ();
stop_callback (); stop_callback ();
} }
} }