1
This commit is contained in:
@@ -288,8 +288,13 @@ class MqttDispatcher {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 记录心跳到设备管理器
|
||||
await deviceManager.recordHeartbeat(sn_code, heartbeatData);
|
||||
// 记录心跳到设备管理器(包含登录状态)
|
||||
const heartbeatPayload = {
|
||||
isLoggedIn: updateData.isLoggedIn || false,
|
||||
...heartbeatData
|
||||
};
|
||||
console.log(`[MQTT心跳] 传递给 deviceManager 的数据:`, { sn_code, isLoggedIn: heartbeatPayload.isLoggedIn });
|
||||
await deviceManager.recordHeartbeat(sn_code, heartbeatPayload);
|
||||
} catch (error) {
|
||||
console.error('[MQTT心跳] 处理心跳消息失败:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user