diff --git a/construct/construct.cc b/construct/construct.cc index d2f2ac10b..4ff4f39aa 100644 --- a/construct/construct.cc +++ b/construct/construct.cc @@ -299,7 +299,7 @@ noexcept try // event loop. This means we lose the true instant hardware-interrupt gratitude // of signals but with the benefit of unconditional safety and cross- // platformness with windows etc. - const construct::signals signals{ios}; + construct::signals signals{ios}; // Associates libircd with our io_context and posts the initial routines // to that io_context. Execution of IRCd will then occur during ios::run() diff --git a/construct/signals.cc b/construct/signals.cc index 2242a89d6..8bd665595 100644 --- a/construct/signals.cc +++ b/construct/signals.cc @@ -45,6 +45,11 @@ construct::signals::signals(boost::asio::io_context &ios) set_handle(); } +construct::signals::~signals() +noexcept +{ +} + // Because we registered signal handlers with the io_context, ios->run() // is now shared between those handlers and libircd. This means the run() // won't return even if we call ircd::quit(). We use this callback to @@ -56,7 +61,7 @@ construct::signals::on_runlevel(const enum ircd::run::level &level) { case ircd::run::level::HALT: case ircd::run::level::QUIT: - signal_set->cancel(); + signal_set.reset(nullptr); break; default: diff --git a/construct/signals.h b/construct/signals.h index 31673eaf5..94c248135 100644 --- a/construct/signals.h +++ b/construct/signals.h @@ -19,4 +19,5 @@ struct construct::signals public: signals(boost::asio::io_context &ios); + ~signals() noexcept; };