fix(network): async connectWifi so systemd watchdog can fire during nmcli wait

This commit is contained in:
stswangzhiping
2026-03-29 08:14:24 +08:00
parent 4c16483ee7
commit e3e9580e46
2 changed files with 41 additions and 9 deletions

View File

@@ -168,7 +168,7 @@ class ProvisionManager extends EventEmitter {
// 关热点后射频/模式切换需要时间,立刻 connect 在部分板子上会失败
await new Promise((r) => setTimeout(r, 3500));
const result = connectWifi(ssid, password);
const result = await connectWifi(ssid, password);
if (result.success) {
this._state = 'sta';