fix(emqx_lua_hook): fix dialyzer warnings.

This commit is contained in:
ayodele.akingbule 2020-12-24 16:44:21 +01:00 committed by Shawn
parent 2126129aee
commit b68a0b3730
2 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ do_register_hooks(Hook, ScriptName, _St) ->
?LOG(error, "Discard unknown hook type ~p from ~p", [Hook, ScriptName]).
do_unloadall(Scripts) ->
[do_unload(X) || X <- Scripts],
lists:foreach(fun do_unload/1, Scripts),
ok.
do_unload(Script) ->

View File

@ -184,7 +184,7 @@ hook(HookPoint, Action, InitArgs) when is_list(InitArgs) ->
hook(HookPoint, Action, Filter, Priority) ->
emqx_hooks:add(HookPoint, Action, Filter, Priority).
-spec(unhook(emqx_hooks:hookpoint(), fun() | {module(), atom()}) -> ok).
-spec(unhook(emqx_hooks:hookpoint(), fun() | {atom(), atom()}) -> ok).
unhook(HookPoint, Action) ->
emqx_hooks:del(HookPoint, Action).