From 49f00718d1b951a411eb2f6d42becfb1ee5a7eaf Mon Sep 17 00:00:00 2001 From: anlicheng Date: Tue, 5 Sep 2023 10:15:07 +0800 Subject: [PATCH] fix --- apps/iot/src/iot_endpoint.erl | 2 +- apps/iot/src/postman/mqtt_postman.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/iot/src/iot_endpoint.erl b/apps/iot/src/iot_endpoint.erl index d17dcb8..ece12ad 100644 --- a/apps/iot/src/iot_endpoint.erl +++ b/apps/iot/src/iot_endpoint.erl @@ -297,7 +297,7 @@ create_postman(#endpoint{name = Name, config = #mqtt_endpoint{host = Host, port {auto_ack, true}, {connect_timeout, 5000}, {proto_ver, v5}, - {retry_interval, 5} + {retry_interval, 5000} ], mqtt_postman:start_link(Opts, Topic, Qos); diff --git a/apps/iot/src/postman/mqtt_postman.erl b/apps/iot/src/postman/mqtt_postman.erl index 0fdfd53..8a6ae34 100644 --- a/apps/iot/src/postman/mqtt_postman.erl +++ b/apps/iot/src/postman/mqtt_postman.erl @@ -48,7 +48,7 @@ init([Opts, Topic, Qos]) -> Opts1 = [{owner, self()} | Opts], {ok, ConnPid} = emqtt:start_link(Opts1), lager:debug("[mqtt_postman] start connect, options: ~p", [Opts1]), - {ok, _} = emqtt:connect(ConnPid), + {ok, _} = emqtt:connect(ConnPid, 5000), lager:debug("[mqtt_postman] connect success, pid: ~p", [ConnPid]), {ok, #state{conn_pid = ConnPid, topic = Topic, qos = Qos}}.