mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
mod_stream_mgmt: Delete 'c2s_init' hook
Delete the 'c2s_init' hook when the last 'mod_stream_mgmt' instance is stopped.
This commit is contained in:
parent
0760c7273c
commit
b8d2a72333
@ -71,7 +71,12 @@ start(Host, _Opts) ->
|
||||
ejabberd_hooks:add(c2s_terminated, Host, ?MODULE, c2s_terminated, 50).
|
||||
|
||||
stop(Host) ->
|
||||
%% TODO: do something with global 'c2s_init' hook
|
||||
case gen_mod:is_loaded_elsewhere(Host, ?MODULE) of
|
||||
true ->
|
||||
ok;
|
||||
false ->
|
||||
ejabberd_hooks:delete(c2s_init, ?MODULE, c2s_stream_init, 50)
|
||||
end,
|
||||
ejabberd_hooks:delete(c2s_stream_started, Host, ?MODULE,
|
||||
c2s_stream_started, 50),
|
||||
ejabberd_hooks:delete(c2s_post_auth_features, Host, ?MODULE,
|
||||
|
Loading…
Reference in New Issue
Block a user