From e9a5c4295c725b26b9858c718b8f10b20ac6a5e5 Mon Sep 17 00:00:00 2001 From: zhongwencool Date: Tue, 9 Aug 2022 10:29:17 +0800 Subject: [PATCH] fix: bad NeedToLoad plugins --- src/emqx_plugins.erl | 2 +- test/emqx_plugins_SUITE.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emqx_plugins.erl b/src/emqx_plugins.erl index caf47b0c0..764778b74 100644 --- a/src/emqx_plugins.erl +++ b/src/emqx_plugins.erl @@ -265,7 +265,7 @@ load_plugins(Names, Persistent) -> [] -> ok; NotFound -> ?LOG(alert, "cannot_find_plugins: ~p", [NotFound]) end, - NeedToLoad = Names -- NotFound -- names(started_app), + NeedToLoad = (Names -- NotFound) -- names(started_app), lists:foreach(fun(Name) -> Plugin = find_plugin(Name, Plugins), load_plugin(Plugin#plugin.name, Persistent) diff --git a/test/emqx_plugins_SUITE.erl b/test/emqx_plugins_SUITE.erl index cd4b68d86..66a88a047 100644 --- a/test/emqx_plugins_SUITE.erl +++ b/test/emqx_plugins_SUITE.erl @@ -100,7 +100,7 @@ t_ensure_default_loaded_plugins_file(Config) -> [ {emqx_bridge_mqtt, false} , {emqx_dashboard, true} , {emqx_management, true} - , {emqx_modules, false} + , {emqx_modules, true} , {emqx_recon, true} , {emqx_retainer, true} , {emqx_rule_engine, true}