fix(stomp): fix bad_return_value

This commit is contained in:
JianBo He 2021-11-04 21:11:12 +08:00
parent f36abc281a
commit ef9fe12825
1 changed files with 3 additions and 6 deletions

View File

@ -292,13 +292,10 @@ handle_info({timeout, _TRef, emit_stats},
handle_info({timeout, TRef, TMsg}, State) -> handle_info({timeout, TRef, TMsg}, State) ->
with_proto(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 case activate_socket(State) of
{ok, NState = #state{sockstate = NewSst}} -> {ok, NState} ->
case OldSst =/= NewSst of noreply(NState);
true -> {ok, {event, NewSst}, NState};
false -> {ok, NState}
end;
{error, Reason} -> {error, Reason} ->
handle_info({sock_error, Reason}, State) handle_info({sock_error, Reason}, State)
end; end;