Feng 10 лет назад
Родитель
Сommit
467c6307f6
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/emqttd_protocol.erl

+ 2 - 2
src/emqttd_protocol.erl

@@ -303,13 +303,13 @@ maybe_set_clientid(State) ->
 
 send_willmsg(_ClientId, undefined) ->
     ignore;
-send_willmsg(ClientId, WillMsg) -> 
+send_willmsg(ClientId, WillMsg) ->
     emqttd:publish(WillMsg#mqtt_message{from = ClientId}).
 
 start_keepalive(0) -> ignore;
 
 start_keepalive(Sec) when Sec > 0 ->
-    self() ! {keepalive, start, Sec}.
+    self() ! {keepalive, start, round(Sec * 1.25)}.
 
 %%--------------------------------------------------------------------
 %% Validate Packets