fix(emqx_app): Dialyzer warnings
This commit is contained in:
parent
3fb69cc407
commit
0eb697fa6f
|
@ -85,4 +85,4 @@ handle_call(_Query, State) ->
|
|||
terminate(swap, _State) ->
|
||||
{emqx_alarm_handler, []};
|
||||
terminate(_, _) ->
|
||||
ok.
|
||||
ok.
|
||||
|
|
|
@ -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().
|
||||
|
|
|
@ -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)->
|
||||
|
|
Loading…
Reference in New Issue