0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-05 19:48:53 +02:00

construct: Improve console termination related.

This commit is contained in:
Jason Volk 2019-10-03 16:08:16 -07:00
parent b238f24862
commit 3c556043fd
2 changed files with 7 additions and 1 deletions

View file

@ -499,8 +499,12 @@ construct::console::on_runlevel(const enum ircd::run::level &runlevel)
switch(runlevel)
{
case ircd::run::level::QUIT:
if(terminate())
context.join();
break;
case ircd::run::level::HALT:
console::terminate();
terminate();
break;
default:

View file

@ -55,6 +55,7 @@ construct::signals::on_runlevel(const enum ircd::run::level &level)
switch(level)
{
case ircd::run::level::HALT:
case ircd::run::level::QUIT:
signal_set->cancel();
break;
@ -185,6 +186,7 @@ void
construct::handle_quit()
try
{
console::terminate();
ircd::quit();
}
catch(const std::exception &e)