1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-05 02:29:34 +02:00

Don't retain module option on gen_mod supervisor

When module's options were updated (e.g. by reloading ejabberd.yml)
and, later, the module's process crashed, gen_mod supervisor
restarts the process with outdated options. This is now fixed.
This commit is contained in:
Evgeny Khramtsov 2019-08-04 21:46:18 +03:00
parent e8fb9ab303
commit 2168489ddf
20 changed files with 53 additions and 41 deletions

View file

@ -151,8 +151,9 @@ user_send_packet(Acc) ->
%%====================================================================
-spec init(list()) -> {ok, state()}.
init([LServerS, Opts]) ->
init([LServerS|_]) ->
process_flag(trap_exit, true),
Opts = gen_mod:get_module_opts(LServerS, ?MODULE),
[LServiceS|_] = gen_mod:get_opt_hosts(Opts),
Access = mod_multicast_opt:access(Opts),
SLimits = build_service_limit_record(mod_multicast_opt:limits(Opts)),