fix: stabilize rk3588 wifi provisioning
This commit is contained in:
@@ -263,11 +263,12 @@ class ClawClient {
|
||||
_connect() {
|
||||
if (this._stopped) return;
|
||||
|
||||
// AP 模式 + 无网:不建立 WS,5s 后重新检查(有线经 -I ping 仍通则建立,避免热点误挡 WS)
|
||||
if (this._provisionMgr && this._provisionMgr.isApMode() && !hasInternet() && !hasWiredInternetProbe()) {
|
||||
// AP 模式下 hasInternet() 可能被热点本地网络 / NetworkManager limited 状态误判。
|
||||
// 只有明确探测到有线口可访问公网时,才允许进入 WS 连接流程并显示 Conn。
|
||||
if (this._provisionMgr && this._provisionMgr.isApMode() && !hasWiredInternetProbe()) {
|
||||
led.display.showAP();
|
||||
log.info('clawd', 'AP 模式无网络,5s 后重新检查...');
|
||||
this._backoff = 1_000; // 有网时立即快速重连
|
||||
log.info('clawd', 'AP 模式无有线网络,5s 后重新检查...');
|
||||
this._backoff = 1_000; // 有线恢复时立即快速重连
|
||||
this._wsFailCount = 0; // 不计入失败
|
||||
setTimeout(() => this._connect(), 5_000);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user