From c8afb5ceb69504a5779abe1c8cbfef63e4610ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Fri, 16 Apr 2021 10:19:09 +0200 Subject: [PATCH] Reconfigure cache in mod_shared_roster when options change --- src/mod_shared_roster.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl index 0c282a331..88676a48e 100644 --- a/src/mod_shared_roster.erl +++ b/src/mod_shared_roster.erl @@ -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) ->