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,
|
||||
password => Password,
|
||||
clean_start => CleanStart,
|
||||
keepalive => KeepAlive,
|
||||
keepalive => ms_to_s(KeepAlive),
|
||||
retry_interval => RetryIntv,
|
||||
max_inflight => MaxInflight,
|
||||
ssl => EnableSsl,
|
||||
|
@ -216,5 +216,8 @@ basic_config(#{
|
|||
if_record_metrics => true
|
||||
}.
|
||||
|
||||
ms_to_s(Ms) ->
|
||||
erlang:ceil(Ms / 1000).
|
||||
|
||||
clientid(Id) ->
|
||||
iolist_to_binary([Id, ":", atom_to_list(node())]).
|
||||
|
|
Loading…
Reference in New Issue