From 43207f86ea66fc9ac4cb1621357cc00d4a6593b2 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Wed, 29 Mar 2017 17:38:43 +0800 Subject: [PATCH] Use stop/2 to count the shutdown reasons --- src/emqttd_ws_client.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqttd_ws_client.erl b/src/emqttd_ws_client.erl index 8797088e0..0c97a5c49 100644 --- a/src/emqttd_ws_client.erl +++ b/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. handle_info({'EXIT', Pid, Reason}, State = #wsclient_state{proto_state = ProtoState}) -> case emqttd_protocol:session(ProtoState) of - Pid -> shutdown(Reason, State); + Pid -> stop(Reason, State); _ -> ?WSLOG(error, "Unexpected EXIT: ~p, Reason: ~p", [Pid, Reason], State), {noreply, State, hibernate} end;