Ery Lee 11 lat temu
rodzic
commit
2deed75c26
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      apps/emqtt/src/emqtt_client.erl

+ 2 - 2
apps/emqtt/src/emqtt_client.erl

@@ -115,14 +115,14 @@ handle_info({inet_reply, _Sock, {error, Reason}}, State) ->
     {noreply, State};
     {noreply, State};
 
 
 handle_info({keepalive, start, TimeoutSec}, State = #state{socket = Socket}) ->
 handle_info({keepalive, start, TimeoutSec}, State = #state{socket = Socket}) ->
-    lager:info("~s keepalive started: ~p", [State#state.peer_name, TimeoutSec]),
+    lager:info("Client: ~s: Start KeepAlive with ~p seconds", [State#state.peer_name, TimeoutSec]),
     KeepAlive = emqtt_keepalive:new(Socket, TimeoutSec, {keepalive, timeout}),
     KeepAlive = emqtt_keepalive:new(Socket, TimeoutSec, {keepalive, timeout}),
     {noreply, State#state{ keepalive = KeepAlive }};
     {noreply, State#state{ keepalive = KeepAlive }};
 
 
 handle_info({keepalive, timeout}, State = #state { keepalive = KeepAlive }) ->
 handle_info({keepalive, timeout}, State = #state { keepalive = KeepAlive }) ->
     case emqtt_keepalive:resume(KeepAlive) of
     case emqtt_keepalive:resume(KeepAlive) of
     timeout ->
     timeout ->
-        lager:info("~s keepalive timeout!", [State#state.peer_name]),
+        lager:info("Client ~s: Keepalive Timeout!", [State#state.peer_name]),
         {stop, normal, State};
         {stop, normal, State};
     {resumed, KeepAlive1} ->
     {resumed, KeepAlive1} ->
         lager:info("~s keepalive resumed.", [State#state.peer_name]),
         lager:info("~s keepalive resumed.", [State#state.peer_name]),