代码更新
This commit is contained in:
@@ -58,7 +58,7 @@ class WebsocketUtil {
|
||||
}
|
||||
this.heartbeatInterval = setInterval(() => {
|
||||
if (this.isOpen) {
|
||||
this.send('心跳检测','heartbeat');
|
||||
this.send(JSON.stringify({"type": "ping_interval"}));
|
||||
}
|
||||
}, this.time);
|
||||
}
|
||||
@@ -68,7 +68,6 @@ class WebsocketUtil {
|
||||
if (this.socketTask && this.isOpen) {
|
||||
this.socketTask.send({
|
||||
data: data,
|
||||
type: type||'heartbeat',
|
||||
success: (res) => {
|
||||
// console.log('消息发送成功', res);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user