mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd:Ⓜ️ Expose an init::close() for ircd::main() to stop listening.
This commit is contained in:
parent
47b28d9295
commit
48f4c22cce
3 changed files with 9 additions and 0 deletions
|
@ -99,6 +99,8 @@ struct ircd::m::init
|
|||
|
||||
static void bootstrap();
|
||||
|
||||
void close();
|
||||
|
||||
public:
|
||||
init();
|
||||
~init() noexcept;
|
||||
|
|
|
@ -205,6 +205,7 @@ noexcept try
|
|||
// Any deinits which have to be done with all subsystems intact
|
||||
const unwind shutdown{[&]
|
||||
{
|
||||
_matrix_.close();
|
||||
_server_.interrupt();
|
||||
_client_.interrupt();
|
||||
_server_.close();
|
||||
|
|
|
@ -102,6 +102,12 @@ catch(const m::error &e)
|
|||
ircd::terminate();
|
||||
}
|
||||
|
||||
void
|
||||
ircd::m::init::close()
|
||||
{
|
||||
listeners.reset(nullptr);
|
||||
}
|
||||
|
||||
ircd::m::init::modules::modules(const json::object &config)
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue