From 54849757852f6ab40eb17afbd03d1d839b60a38d Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 13 Nov 2023 17:09:15 +0800
Subject: [PATCH] 重复定时和连续执行
---
src/mqtt/config.ts | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/mqtt/config.ts b/src/mqtt/config.ts
index 1af7df6..7f91a74 100644
--- a/src/mqtt/config.ts
+++ b/src/mqtt/config.ts
@@ -1,4 +1,3 @@
-
import {
IClientOptions,
} from 'mqtt'
@@ -8,5 +7,11 @@
connectTimeout: 10000, // mqtt 超时时间
resubscribe: true, // 断开重连后,再次订阅原订阅
reconnectPeriod: 10000, // 重连间隔时间: 5s
- keepalive: 1, // 心跳间隔时间:1s
+ keepalive: 5, // 心跳间隔时间:1s
+ clientId: 'DroneWeb',
+ username: 'root',
+ password: 'root',
+ host: '182.106.212.58',
+ protocol: 'ws',
+ port: 35675,
}
--
Gitblit v1.9.3