diff --git a/nano/node/ipc/ipc_server.cpp b/nano/node/ipc/ipc_server.cpp index ab5b39ef02..3b65534468 100644 --- a/nano/node/ipc/ipc_server.cpp +++ b/nano/node/ipc/ipc_server.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include @@ -602,7 +601,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) @@ -647,6 +646,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; }; } }