From ef9fe12825eee72106f30b1c5935caae31979462 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Thu, 4 Nov 2021 21:11:12 +0800 Subject: [PATCH] fix(stomp): fix bad_return_value --- apps/emqx_stomp/src/emqx_stomp_connection.erl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/emqx_stomp/src/emqx_stomp_connection.erl b/apps/emqx_stomp/src/emqx_stomp_connection.erl index 63e76faed..d2bf3d8b0 100644 --- a/apps/emqx_stomp/src/emqx_stomp_connection.erl +++ b/apps/emqx_stomp/src/emqx_stomp_connection.erl @@ -292,13 +292,10 @@ handle_info({timeout, _TRef, emit_stats}, handle_info({timeout, TRef, TMsg}, State) -> with_proto(timeout, [TRef, TMsg], State); -handle_info(activate_socket, State = #state{sockstate = OldSst}) -> +handle_info(activate_socket, State) -> case activate_socket(State) of - {ok, NState = #state{sockstate = NewSst}} -> - case OldSst =/= NewSst of - true -> {ok, {event, NewSst}, NState}; - false -> {ok, NState} - end; + {ok, NState} -> + noreply(NState); {error, Reason} -> handle_info({sock_error, Reason}, State) end;