fix(bridge): time unit error for MQTT keepalive
This commit is contained in:
parent
eb992ad2ad
commit
4406589980
|
@ -208,7 +208,7 @@ basic_config(#{
|
||||||
username => User,
|
username => User,
|
||||||
password => Password,
|
password => Password,
|
||||||
clean_start => CleanStart,
|
clean_start => CleanStart,
|
||||||
keepalive => KeepAlive,
|
keepalive => ms_to_s(KeepAlive),
|
||||||
retry_interval => RetryIntv,
|
retry_interval => RetryIntv,
|
||||||
max_inflight => MaxInflight,
|
max_inflight => MaxInflight,
|
||||||
ssl => EnableSsl,
|
ssl => EnableSsl,
|
||||||
|
@ -216,5 +216,8 @@ basic_config(#{
|
||||||
if_record_metrics => true
|
if_record_metrics => true
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
ms_to_s(Ms) ->
|
||||||
|
erlang:ceil(Ms / 1000).
|
||||||
|
|
||||||
clientid(Id) ->
|
clientid(Id) ->
|
||||||
iolist_to_binary([Id, ":", atom_to_list(node())]).
|
iolist_to_binary([Id, ":", atom_to_list(node())]).
|
||||||
|
|
Loading…
Reference in New Issue