This commit is contained in:
Feng 2015-07-08 22:12:33 +08:00
parent 86cfbf8c43
commit 711a875e23
1 changed files with 11 additions and 10 deletions

View File

@ -428,7 +428,7 @@ handle_info({dispatch, Msg = #mqtt_message{qos = QoS}},
true -> true ->
{noreply, deliver(Msg, Session)}; {noreply, deliver(Msg, Session)};
false -> false ->
lager:warning([{client, ClientId}], "Session ~s inflight queue is full!", [ClientId]), lager:error([{client, ClientId}], "Session ~s inflight queue is full!", [ClientId]),
{noreply, Session#session{message_queue = emqttd_mqueue:in(Msg, MsgQ)}} {noreply, Session#session{message_queue = emqttd_mqueue:in(Msg, MsgQ)}}
end; end;
@ -488,7 +488,8 @@ handle_info({'EXIT', ClientPid, Reason}, Session = #session{clean_sess = false,
client_id = ClientId, client_id = ClientId,
client_pid = ClientPid, client_pid = ClientPid,
expired_after = Expires}) -> expired_after = Expires}) ->
lager:info("Session ~s unlink with client ~p: reason=~p", [ClientId, ClientPid, Reason]), lager:info("Session ~s unlink with client ~p: reason=~p",
[ClientId, ClientPid, Reason]),
TRef = timer(Expires, session_expired), TRef = timer(Expires, session_expired),
{noreply, Session#session{client_pid = undefined, expired_timer = TRef}, hibernate}; {noreply, Session#session{client_pid = undefined, expired_timer = TRef}, hibernate};