mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd: Add interrupt for server dtor.
This commit is contained in:
parent
97672ccc8f
commit
bcebeb420d
3 changed files with 9 additions and 0 deletions
|
@ -117,6 +117,8 @@ struct ircd::server::node
|
|||
|
||||
struct ircd::server::init
|
||||
{
|
||||
void interrupt();
|
||||
|
||||
init();
|
||||
~init() noexcept;
|
||||
};
|
||||
|
|
|
@ -281,6 +281,7 @@ try
|
|||
// Any deinits which have to be done with all subsystems intact
|
||||
const unwind shutdown{[&]
|
||||
{
|
||||
_server_.interrupt();
|
||||
_client_.interrupt();
|
||||
}};
|
||||
|
||||
|
|
|
@ -36,6 +36,12 @@ noexcept
|
|||
ircd::server::nodes.clear();
|
||||
}
|
||||
|
||||
void
|
||||
ircd::server::init::interrupt()
|
||||
{
|
||||
ircd::server::nodes.clear();
|
||||
}
|
||||
|
||||
//
|
||||
// server
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue