Parcourir la source

Issue #460 - Timer Tick at interval of (Keepalive * 1.5)/2

Feng il y a 10 ans
Parent
commit
cf4dfe632f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/emqttd_protocol.erl

+ 1 - 1
src/emqttd_protocol.erl

@@ -307,7 +307,7 @@ send_willmsg(ClientId, WillMsg) ->
 start_keepalive(0) -> ignore;
 start_keepalive(0) -> ignore;
 
 
 start_keepalive(Sec) when Sec > 0 ->
 start_keepalive(Sec) when Sec > 0 ->
-    self() ! {keepalive, start, round(Sec * 1.2)}.
+    self() ! {keepalive, start, round(Sec * 0.75)}.
 
 
 %%--------------------------------------------------------------------
 %%--------------------------------------------------------------------
 %% Validate Packets
 %% Validate Packets