websocket_reset

This commit is contained in:
gtz
2023-09-12 16:15:01 +08:00
parent 3d42b358d0
commit b5602d4981
4 changed files with 8 additions and 7 deletions

View File

@@ -28,6 +28,7 @@ wss.on('connection', function (ws, req) {
const timer = setInterval(() => {
sendMsg(ws, 'kiln-info'); // 窑炉信息
sendMsg(ws, 'energy-cost'); // 运行状态
sendMsg(ws, 'run-state'); // 运行状态
sendMsg(ws, 'realtime');
sendMsg(ws, 'his-trend');
// sendMsg(ws, 'gas');
@@ -36,7 +37,7 @@ wss.on('connection', function (ws, req) {
}, frequency * 1000);
const timer1 = setInterval(() => {
sendMsg(ws, 'run-state'); // 运行状态
// sendMsg(ws, 'run-state'); // 运行状态
}, frequency1 * 1000);
ws.on('close', function () {