fix: WS 多次失败时统一显示 AP,移除 Err0 分支
WS 失败 ≥ 3 次无论是否有网络均显示 showAP, 不再区分"有网但 VPS 不可达"时显示 showErr0。 Made-with: Cursor
This commit is contained in:
@@ -304,12 +304,7 @@ class ClawClient {
|
|||||||
this._wsFailCount++;
|
this._wsFailCount++;
|
||||||
log.warn('clawd', `连接断开 (${code}),失败次数=${this._wsFailCount},${this._backoff / 1000}s 后重连...`);
|
log.warn('clawd', `连接断开 (${code}),失败次数=${this._wsFailCount},${this._backoff / 1000}s 后重连...`);
|
||||||
if (this._hasEverConnected && this._wsFailCount >= 3) {
|
if (this._hasEverConnected && this._wsFailCount >= 3) {
|
||||||
const inAp = this._provisionMgr && this._provisionMgr.isApMode();
|
led.display.showAP();
|
||||||
if (inAp || (!hasInternet() && !hasWiredInternetProbe())) {
|
|
||||||
led.display.showAP(); // AP 模式 或 无网(有线探测也无则视为无上行)
|
|
||||||
} else {
|
|
||||||
led.display.showErr0(); // STA 模式 + 有网 但 VPS 不可达
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this._certTimeError) {
|
if (this._certTimeError) {
|
||||||
// NTP 未同步:固定 5s 重试,等时钟校正
|
// NTP 未同步:固定 5s 重试,等时钟校正
|
||||||
|
|||||||
Reference in New Issue
Block a user