mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
construct: Improve console termination related.
This commit is contained in:
parent
b238f24862
commit
3c556043fd
2 changed files with 7 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue