fix(keepalive): keepalive init with right recv_oct

This commit is contained in:
zhongwencool 2022-01-26 18:27:15 +08:00
parent e458d4790c
commit abc0a3526e
3 changed files with 2 additions and 8 deletions

View File

@ -649,9 +649,6 @@ mqtt {
## The backoff for MQTT keepalive timeout. The broker will kick a connection out
## until 'Keepalive * backoff * 2' timeout.
## There is one exception:
## If the client connects successfully and then does not send any more packets,
## it will be kicked out until 'Keepalive * backoff * 3'.
##
## @doc mqtt.keepalive_backoff
## ValueType: Float

View File

@ -39,7 +39,7 @@
-spec(init(Interval :: non_neg_integer()) -> keepalive()).
init(Interval) when Interval > 0 ->
#keepalive{interval = Interval,
statval = 0,
statval = emqx_pd:get_counter(incoming_bytes),
repeat = 0}.
%% @doc Get Info of the keepalive.

View File

@ -364,10 +364,7 @@ This feature is disabled if is set to \"\"."""
#{default => 0.75,
desc =>
"""The backoff for MQTT keepalive timeout. The broker will kick a connection out
until 'Keepalive * backoff * 2' timeout.
There is one exception:
If the client connects successfully and then does not send any more packets,
it will be kicked out until 'Keepalive * backoff * 3'."""
until 'Keepalive * backoff * 2' timeout."""
})
}
, {"max_subscriptions",