0
0
Fork 0
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:
Jason Volk 2017-11-30 10:27:02 -08:00
parent 97672ccc8f
commit bcebeb420d
3 changed files with 9 additions and 0 deletions

View file

@ -117,6 +117,8 @@ struct ircd::server::node
struct ircd::server::init
{
void interrupt();
init();
~init() noexcept;
};

View file

@ -281,6 +281,7 @@ try
// Any deinits which have to be done with all subsystems intact
const unwind shutdown{[&]
{
_server_.interrupt();
_client_.interrupt();
}};

View file

@ -36,6 +36,12 @@ noexcept
ircd::server::nodes.clear();
}
void
ircd::server::init::interrupt()
{
ircd::server::nodes.clear();
}
//
// server
//