Desktop app #5

Merged
benoit merged 30 commits from desktop-app into main 2026-07-03 17:34:52 +02:00
Showing only changes of commit 17afd6e5f1 - Show all commits
+19 -9
View File
@@ -184,20 +184,30 @@ async function startServer() {
createTray(); // Mettre à jour tray createTray(); // Mettre à jour tray
}); });
// Timeout de sécurité (10s) // Timeout de sécurité (15s)
setTimeout(() => { setTimeout(() => {
if (!serverStarted && serverProcess) { if (!serverStarted && serverProcess) {
console.log('⏱️ Timeout démarrage serveur, on assume que c\'est OK'); console.log('⏱️ Timeout démarrage serveur (15s), vérification health...');
serverStarted = true;
if (mainWindow) { // Vérifier que le serveur répond vraiment
mainWindow.webContents.send('server:status', { running: true }); pingServer().then((health) => {
} if (health.success) {
serverStarted = true;
console.log('✅ Serveur répond au health check');
createTray(); if (mainWindow) {
resolve({ success: true, url: SERVER_URL }); mainWindow.webContents.send('server:status', { running: true });
}
createTray();
resolve({ success: true, url: SERVER_URL });
} else {
console.error('❌ Serveur ne répond pas après 15s');
reject(new Error('Server startup timeout'));
}
});
} }
}, 10000); }, 15000);
}); });
} }