fix: getDashboardInfo uses spawn+Promise to handle long-running process
Made-with: Cursor
This commit is contained in:
@@ -20,10 +20,9 @@ class ClawClient {
|
||||
this._dashInfo = {}; // { dashboard_token, dashboard_port }
|
||||
}
|
||||
|
||||
start() {
|
||||
async start() {
|
||||
console.log(`[clawd] 启动中... 服务器 = ${this._cfg.server}`);
|
||||
// 启动前提取 openclaw dashboard 信息(耗时操作放后台,不阻塞连接)
|
||||
this._dashInfo = getDashboardInfo();
|
||||
this._dashInfo = await getDashboardInfo();
|
||||
this._connect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user