[REFACTOR] 關閉閒置 30 分鐘主動重啟機制以維持連線穩定
1. 註解掉 FontendActivity 中的閒置 30 分鐘重啟邏輯。 2. 改為僅依賴每 4 小時一次的定時重啟,優化 MQTT 連線紀錄的穩定性並減少頻繁斷線。
This commit is contained in:
parent
65dd123d0c
commit
d68482a005
@ -254,11 +254,13 @@ public class FontendActivity extends AppCompatActivityAbstract {
|
||||
new RestartAPP2(this).start();
|
||||
}
|
||||
|
||||
// 【第二層】閒置深度刷新:任何時間閒置超過 30 分鐘就重啟
|
||||
// 【第二層】閒置深度刷新:任何時間閒置超過 30 分鐘就重啟 (暫時關閉,改依賴定時重啟)
|
||||
/*
|
||||
if (MyApp.getInstance().getIdleSeconds() >= 30 * 60) {
|
||||
getLogs().info("閒置超過 30 分鐘,執行深度排毒重啟...");
|
||||
new RestartAPP2(this).start();
|
||||
}
|
||||
*/
|
||||
|
||||
// 這裡判斷每5分鐘去跑連線下位機的狀態
|
||||
// String minutePart = timeByM.split(":")[1]; // 取得 "mm" 部分
|
||||
|
||||
Loading…
Reference in New Issue
Block a user