fix issue #413
This commit is contained in:
parent
9ecc4330d6
commit
78dd1f8838
|
@ -223,8 +223,18 @@ handle_info({keepalive, check}, State = #wsclient_state{request = Req,
|
||||||
handle_info({'EXIT', WsPid, Reason}, State = #wsclient_state{ws_pid = WsPid}) ->
|
handle_info({'EXIT', WsPid, Reason}, State = #wsclient_state{ws_pid = WsPid}) ->
|
||||||
stop(Reason, State);
|
stop(Reason, State);
|
||||||
|
|
||||||
|
handle_info({'EXIT', SessPid, Reason}, State = #wsclient_state{request = Req,
|
||||||
|
proto_state = ProtoState}) ->
|
||||||
|
case emqttd_protocol:session(ProtoState) of
|
||||||
|
SessPid ->
|
||||||
|
stop(Reason, State);
|
||||||
|
ExitPid ->
|
||||||
|
?WSLOG(error, "Unexpected EXIT ~p for ~p", [ExitPid, Reason], Req),
|
||||||
|
noreply(State)
|
||||||
|
end;
|
||||||
|
|
||||||
handle_info(Info, State = #wsclient_state{request = Req}) ->
|
handle_info(Info, State = #wsclient_state{request = Req}) ->
|
||||||
?WSLOG(error, "Unexpected Info: ~p", [Info], Req),
|
?WSLOG(critical, "Unexpected Info: ~p", [Info], Req),
|
||||||
noreply(State).
|
noreply(State).
|
||||||
|
|
||||||
terminate(Reason, #wsclient_state{proto_state = ProtoState, keepalive = KeepAlive}) ->
|
terminate(Reason, #wsclient_state{proto_state = ProtoState, keepalive = KeepAlive}) ->
|
||||||
|
|
Loading…
Reference in New Issue