0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +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 struct ircd::server::init
{ {
void interrupt();
init(); init();
~init() noexcept; ~init() noexcept;
}; };

View file

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

View file

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