diff --git a/nano/node/ipc/ipc_server.cpp b/nano/node/ipc/ipc_server.cpp index 9eaf1e7509..777a9ee2bb 100644 --- a/nano/node/ipc/ipc_server.cpp +++ b/nano/node/ipc/ipc_server.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include @@ -614,7 +613,7 @@ nano::ipc::ipc_server::ipc_server (nano::node & node_a, nano::node_rpc_config co } #ifndef _WIN32 // Hook up config reloading through the HUP signal - auto signals (std::make_shared (node.io_ctx, SIGHUP)); + signals = std::make_shared (node.io_ctx, SIGHUP); await_hup_signal (signals, *this); #endif if (node_a.config.ipc_config.transport_domain.enabled) @@ -659,6 +658,10 @@ void nano::ipc::ipc_server::stop () { transport->stop (); } + if (signals) + { + signals->cancel (); + } } std::optional nano::ipc::ipc_server::listening_tcp_port () const diff --git a/nano/node/ipc/ipc_server.hpp b/nano/node/ipc/ipc_server.hpp index a9f175dbbc..378d78eb32 100644 --- a/nano/node/ipc/ipc_server.hpp +++ b/nano/node/ipc/ipc_server.hpp @@ -6,6 +6,8 @@ #include #include +#include + #include #include @@ -41,6 +43,7 @@ namespace ipc nano::ipc::access access; std::unique_ptr file_remover; std::vector> transports; + std::shared_ptr signals; }; } }