This commit is contained in:
anlicheng 2023-09-05 10:15:07 +08:00
parent f6607746cc
commit 49f00718d1
2 changed files with 2 additions and 2 deletions

View File

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

View File

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