mirror of
https://github.com/matrix-construct/construct
synced 2025-01-15 17:16:49 +01:00
modules/s_listen: Clear listeners before static destruction.
This commit is contained in:
parent
739028eeb5
commit
03c353599c
1 changed files with 8 additions and 1 deletions
|
@ -18,12 +18,13 @@ static bool load_listener(const m::event &);
|
||||||
extern "C" bool unload_listener(const string_view &name);
|
extern "C" bool unload_listener(const string_view &name);
|
||||||
extern "C" bool load_listener(const string_view &name);
|
extern "C" bool load_listener(const string_view &name);
|
||||||
static void init_listeners();
|
static void init_listeners();
|
||||||
|
static void on_unload();
|
||||||
static void on_load();
|
static void on_load();
|
||||||
|
|
||||||
mapi::header
|
mapi::header
|
||||||
IRCD_MODULE
|
IRCD_MODULE
|
||||||
{
|
{
|
||||||
"Server listeners", on_load
|
"Server listeners", on_load, on_unload
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Active listener state
|
/// Active listener state
|
||||||
|
@ -51,6 +52,12 @@ on_load()
|
||||||
init_listeners();
|
init_listeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
on_unload()
|
||||||
|
{
|
||||||
|
listeners.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
init_listeners()
|
init_listeners()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue