[AI Generated]: refactor(*): 保活定时器与连接清理逻辑收口至 app.js,修复 null 安全与注释错误
- 新增 app.startKeepAlive/stopKeepAlive/cleanupConnection,bus 监听自动控制保活与断联清理 - Blue.stop() 收入 cleanupConnection,页面 onHide/onUnload 统一调用 - 修复 replaceNetwork.js seviceList 可能为 undefined 导致崩溃 - 修复 configureDevice_2.js device.mac 为 null 时崩溃 - 修复 replaceNetwork_1.js activeProtocol 无 null 检查及 wifiList 容错 - 修正 configureDevice_4.js 超时注释(3分钟→30秒)
This commit is contained in:
@@ -51,7 +51,7 @@ Component({
|
||||
otaMessage: '升级初始化中...'
|
||||
});
|
||||
|
||||
// 启动超时保护,3 分钟内未完成则视为失败
|
||||
// 启动超时保护,30 秒内未完成则视为失败
|
||||
this._clearOtaTimer();
|
||||
this._otaTimer = setTimeout(() => {
|
||||
console.log('OTA 升级超时');
|
||||
@@ -60,8 +60,8 @@ Component({
|
||||
|
||||
// 回调参数:数字(指令状态码)或对象 { progress, isFailed }
|
||||
activeProtocol.codeOtaUpdate((res, status) => {
|
||||
console.log('OTA 升级回调:', status);
|
||||
console.log('OTA 升级回调:', res);
|
||||
console.log('OTA 升级 status 回调 :', status);
|
||||
console.log('OTA 升级 res 回调:', res);
|
||||
|
||||
// // 已完成(成功或失败)则忽略后续回调
|
||||
// if (this._otaCompleted) return;
|
||||
|
||||
Reference in New Issue
Block a user