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);
|
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
|
// Let windowStateKeeper manage the window
|
||||||
mainWindowState.manage(mainWindow);
|
mainWindowState.manage(mainWindow);
|
||||||
|
|
||||||
@@ -1059,7 +1065,6 @@ ipcMain.handle('get-goosed-host-port', async (event) => {
|
|||||||
if (!client) {
|
if (!client) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
await checkServerStatus(client);
|
|
||||||
return client.getConfig().baseUrl || null;
|
return client.getConfig().baseUrl || null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user