Skip to content

Commit

Permalink
Stop node when destroying inactive_node
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Sep 22, 2023
1 parent a40bdcd commit 6498834
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nano/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,11 @@ nano::inactive_node::inactive_node (boost::filesystem::path const & path_a, nano
{
}

nano::inactive_node::~inactive_node ()
{
node_wrapper.node->stop ();
}

nano::node_flags const & nano::inactive_node_flag_defaults ()
{
static nano::node_flags node_flags;
Expand Down
1 change: 1 addition & 0 deletions nano/node/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class inactive_node final
public:
inactive_node (boost::filesystem::path const & path_a, nano::node_flags const & node_flags_a);
inactive_node (boost::filesystem::path const & path_a, boost::filesystem::path const & config_path_a, nano::node_flags const & node_flags_a);
~inactive_node ();

nano::node_wrapper node_wrapper;
std::shared_ptr<nano::node> node;
Expand Down

0 comments on commit 6498834

Please sign in to comment.