diff --git a/apps/emqx_plugins/src/emqx_plugins.erl b/apps/emqx_plugins/src/emqx_plugins.erl index 0879d5936..c7c67ed23 100644 --- a/apps/emqx_plugins/src/emqx_plugins.erl +++ b/apps/emqx_plugins/src/emqx_plugins.erl @@ -648,7 +648,8 @@ put_config(Key, Value) when is_atom(Key) -> put_config([Key], Value); put_config(Path, Values) when is_list(Path) -> Opts = #{rawconf_with_defaults => true, override_to => cluster}, - case emqx_conf:update([?CONF_ROOT | Path], bin_key(Values), Opts) of + %% Already in cluster_rpc, don't use emqx_conf:update, dead calls + case emqx:update_config([?CONF_ROOT | Path], bin_key(Values), Opts) of {ok, _} -> ok; Error -> Error end. diff --git a/apps/emqx_plugins/test/emqx_plugins_tests.erl b/apps/emqx_plugins/test/emqx_plugins_tests.erl index 58829c07f..c4982a8ff 100644 --- a/apps/emqx_plugins/test/emqx_plugins_tests.erl +++ b/apps/emqx_plugins/test/emqx_plugins_tests.erl @@ -125,8 +125,8 @@ purge_test() -> meck_emqx() -> meck:new(emqx, [unstick, passthrough]), meck:expect( - emqx_conf, - update, + emqx, + update_config, fun(Path, Values, _Opts) -> emqx_config:put(Path, Values) end