mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
fix: check server is ready so that we can decode the recipe deeplink (#5021)
This commit is contained in:
@@ -593,6 +593,12 @@ const createChat = async (
|
||||
);
|
||||
goosedClients.set(mainWindow.id, goosedClient);
|
||||
|
||||
console.log('[Main] Waiting for backend server to be ready...');
|
||||
const serverReady = await checkServerStatus(goosedClient);
|
||||
if (!serverReady) {
|
||||
throw new Error('Backend server failed to start in time');
|
||||
}
|
||||
|
||||
// Let windowStateKeeper manage the window
|
||||
mainWindowState.manage(mainWindow);
|
||||
|
||||
@@ -1059,7 +1065,6 @@ ipcMain.handle('get-goosed-host-port', async (event) => {
|
||||
if (!client) {
|
||||
return null;
|
||||
}
|
||||
await checkServerStatus(client);
|
||||
return client.getConfig().baseUrl || null;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user