mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 23:14:37 +00:00
fix(startup): recover from core port 7788 conflict automatically (#2626)
This commit is contained in:
@@ -20,4 +20,16 @@ async function invokeCmd<T>(cmd: string, args?: Record<string, unknown>): Promis
|
||||
return invoke<T>(cmd, args);
|
||||
}
|
||||
|
||||
export const bootCheckTransport: BootCheckTransport = { callRpc, invokeCmd };
|
||||
/**
|
||||
* Invoke the `recover_port_conflict` Tauri command to reap stale OpenHuman
|
||||
* processes and restart the embedded core on any available port.
|
||||
*/
|
||||
export async function recoverPortConflict(): Promise<{
|
||||
success: boolean;
|
||||
message: string;
|
||||
new_port?: number;
|
||||
}> {
|
||||
return invokeCmd('recover_port_conflict');
|
||||
}
|
||||
|
||||
export const bootCheckTransport: BootCheckTransport = { callRpc, invokeCmd, recoverPortConflict };
|
||||
|
||||
Reference in New Issue
Block a user