优化长连接

This commit is contained in:
duan
2024-06-06 14:55:23 +08:00
parent 1e9797f09a
commit 554217180e
4 changed files with 39 additions and 19 deletions

View File

@@ -125,10 +125,10 @@ class webSocketUtils {
start(data) {
console.log('开启心跳检测',data)
this.heartbeatInterval = setInterval(() => {
// this.send({
// data: '心跳检测',
// type: 'jc',
// });
this.send({
data: '心跳检测',
type: 'heartbeat',
});
}, this.timeout);
}
//重新连接