fix(provision): treat WiFi join success by STA state, not internet ping

This commit is contained in:
stswangzhiping
2026-03-29 07:10:43 +08:00
parent 2ec02d71bb
commit 012ad90335
3 changed files with 33 additions and 11 deletions

View File

@@ -124,7 +124,9 @@ class CaptiveServer {
// 延迟执行,确保 HTTP 响应送达
if (this._onConnect) {
setTimeout(() => {
this._onConnect(ssid, password || '');
Promise.resolve(this._onConnect(ssid, password || '')).catch((e) => {
log.error('http', '配网回调异常:', e.message);
});
}, 1000);
}
}