0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

modules/s_listen: Clear listeners before static destruction.

This commit is contained in:
Jason Volk 2018-09-01 22:23:08 -07:00
parent 739028eeb5
commit 03c353599c

View file

@ -18,12 +18,13 @@ static bool load_listener(const m::event &);
extern "C" bool unload_listener(const string_view &name);
extern "C" bool load_listener(const string_view &name);
static void init_listeners();
static void on_unload();
static void on_load();
mapi::header
IRCD_MODULE
{
"Server listeners", on_load
"Server listeners", on_load, on_unload
};
/// Active listener state
@ -51,6 +52,12 @@ on_load()
init_listeners();
}
void
on_unload()
{
listeners.clear();
}
void
init_listeners()
{