瀏覽代碼

Merge pull request #6063 from HJianBo/refactor-stomp-gw

fix(stomp): fix bad_return_value
tigercl 4 年之前
父節點
當前提交
26bc3ca0b4
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      apps/emqx_stomp/src/emqx_stomp_connection.erl

+ 3 - 6
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;