keepalive * 1.25

This commit is contained in:
Feng 2016-03-15 00:58:35 +08:00
parent 23d1e96fff
commit 467c6307f6
1 changed files with 2 additions and 2 deletions

View File

@ -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