Reconfigure cache in mod_shared_roster when options change

This commit is contained in:
Paweł Chmielowski 2021-04-16 10:19:09 +02:00
parent b3374e1f99
commit c8afb5ceb6
1 changed files with 3 additions and 1 deletions

View File

@ -136,11 +136,13 @@ stop(Host) ->
reload(Host, NewOpts, OldOpts) ->
NewMod = gen_mod:db_mod(NewOpts, ?MODULE),
OldMod = gen_mod:db_mod(OldOpts, ?MODULE),
if NewMod /= OldMod ->
if
NewMod /= OldMod ->
NewMod:init(Host, NewOpts);
true ->
ok
end,
init_cache(NewMod, Host, NewOpts),
ok.
depends(_Host, _Opts) ->