diff --git a/src/emqx_alarm_handler.erl b/src/emqx_alarm_handler.erl index 7f66f6eb1..667dc99e6 100644 --- a/src/emqx_alarm_handler.erl +++ b/src/emqx_alarm_handler.erl @@ -85,4 +85,4 @@ handle_call(_Query, State) -> terminate(swap, _State) -> {emqx_alarm_handler, []}; terminate(_, _) -> - ok. \ No newline at end of file + ok. diff --git a/src/emqx_app.erl b/src/emqx_app.erl index 689a1b69e..42196d70a 100644 --- a/src/emqx_app.erl +++ b/src/emqx_app.erl @@ -34,18 +34,18 @@ start(_Type, _Args) -> {ok, Sup} = emqx_sup:start_link(), ok = emqx_modules:load(), ok = emqx_plugins:init(), - emqx_plugins:load(), + _ = emqx_plugins:load(), emqx_boot:is_enabled(listeners) andalso (ok = emqx_listeners:start()), start_autocluster(), register(emqx, self()), - emqx_alarm_handler:load(), + ok = emqx_alarm_handler:load(), print_vsn(), {ok, Sup}. -spec(stop(State :: term()) -> term()). stop(_State) -> - emqx_alarm_handler:unload(), + ok = emqx_alarm_handler:unload(), emqx_boot:is_enabled(listeners) andalso emqx_listeners:stop(), emqx_modules:unload(). diff --git a/src/emqx_plugins.erl b/src/emqx_plugins.erl index 6c7408a28..b62e9eb85 100644 --- a/src/emqx_plugins.erl +++ b/src/emqx_plugins.erl @@ -59,7 +59,7 @@ init() -> end. %% @doc Load all plugins when the broker started. --spec(load() -> list() | {error, term()}). +-spec(load() -> ok | ignore | {error, term()}). load() -> load_expand_plugins(), case emqx:get_env(plugins_loaded_file) of @@ -103,7 +103,7 @@ unload(PluginName) when is_atom(PluginName) -> ?LOG(error, "Plugin ~s is not started", [PluginName]), {error, not_started}; {_, _} -> - unload_plugin(PluginName, true) + unload_plugin(PluginName, true) end. reload(PluginName) when is_atom(PluginName)->