chore(emqx_exproto): tell dialyzer exit functions do not return

This commit is contained in:
z8674558 2021-02-24 16:03:28 +09:00 committed by Yudai Kiyofuji
parent a6b5e0707d
commit 3e9abbe95a
1 changed files with 2 additions and 0 deletions

View File

@ -273,6 +273,7 @@ run_loop(Parent, State = #state{socket = Socket,
exit_on_sock_error(Reason)
end.
-spec exit_on_sock_error(atom()) -> no_return().
exit_on_sock_error(Reason) when Reason =:= einval;
Reason =:= enotconn;
Reason =:= closed ->
@ -449,6 +450,7 @@ handle_msg(Msg, State) ->
%%--------------------------------------------------------------------
%% Terminate
-spec terminate(atom(), state()) -> no_return().
terminate(Reason, State = #state{channel = Channel}) ->
?LOG(debug, "Terminated due to ~p", [Reason]),
_ = emqx_exproto_channel:terminate(Reason, Channel),