mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
gen_mod: Reload modules after reloading listeners
Make sure modules won't be reloaded before listeners. This is necessary to allow the (not yet committed) 'mod_stun_disco' module to parse the listener configuration after configuration reloads.
This commit is contained in:
parent
c55e7b8499
commit
88f392721b
@ -86,7 +86,7 @@ start_link() ->
|
||||
end.
|
||||
|
||||
init([]) ->
|
||||
ejabberd_hooks:add(config_reloaded, ?MODULE, config_reloaded, 50),
|
||||
ejabberd_hooks:add(config_reloaded, ?MODULE, config_reloaded, 60),
|
||||
ejabberd_hooks:add(host_up, ?MODULE, start_modules, 40),
|
||||
ejabberd_hooks:add(host_down, ?MODULE, stop_modules, 70),
|
||||
ets:new(ejabberd_modules,
|
||||
@ -97,7 +97,7 @@ init([]) ->
|
||||
|
||||
-spec stop() -> ok.
|
||||
stop() ->
|
||||
ejabberd_hooks:delete(config_reloaded, ?MODULE, config_reloaded, 50),
|
||||
ejabberd_hooks:delete(config_reloaded, ?MODULE, config_reloaded, 60),
|
||||
ejabberd_hooks:delete(host_up, ?MODULE, start_modules, 40),
|
||||
ejabberd_hooks:delete(host_down, ?MODULE, stop_modules, 70),
|
||||
stop_modules(),
|
||||
|
Loading…
Reference in New Issue
Block a user