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