Sfoglia il codice sorgente

Use stop/2 to count the shutdown reasons

Feng Lee 9 anni fa
parent
commit
43207f86ea
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/emqttd_ws_client.erl

+ 1 - 1
src/emqttd_ws_client.erl

@@ -228,7 +228,7 @@ handle_info({'EXIT', WsPid, Reason}, State = #wsclient_state{ws_pid = WsPid}) ->
 %% The session process exited unexpectedly.
 %% The session process exited unexpectedly.
 handle_info({'EXIT', Pid, Reason}, State = #wsclient_state{proto_state = ProtoState}) ->
 handle_info({'EXIT', Pid, Reason}, State = #wsclient_state{proto_state = ProtoState}) ->
     case emqttd_protocol:session(ProtoState) of
     case emqttd_protocol:session(ProtoState) of
-        Pid -> shutdown(Reason, State);
+        Pid -> stop(Reason, State);
         _   -> ?WSLOG(error, "Unexpected EXIT: ~p, Reason: ~p", [Pid, Reason], State),
         _   -> ?WSLOG(error, "Unexpected EXIT: ~p, Reason: ~p", [Pid, Reason], State),
                {noreply, State, hibernate}
                {noreply, State, hibernate}
     end;
     end;