chore(style): fix elvis check for emqx_connection

This commit is contained in:
Zaiming Shi 2021-02-13 11:50:17 +01:00
parent b4b318cb86
commit 406a7d60c7
2 changed files with 7 additions and 5 deletions

View File

@ -29,6 +29,8 @@
-compile(nowarn_export_all).
-endif.
-elvis([{elvis_style, invalid_dynamic_call, #{ ignore => [emqx_connection]}}]).
%% API
-export([ start_link/3
, stop/1
@ -671,9 +673,9 @@ conn_info(Key, Channel) ->
handle_info(activate_socket, State = #state{sockstate = OldSst}) ->
case activate_socket(State) of
{ok, NState = #state{sockstate = NewSst}} ->
if OldSst =/= NewSst ->
{ok, {event, NewSst}, NState};
true -> {ok, NState}
case OldSst =/= NewSst of
true -> {ok, {event, NewSst}, NState};
false -> {ok, NState}
end;
{error, Reason} ->
handle_info({sock_error, Reason}, State)