File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -547,7 +547,12 @@ ipcMain.handle('install-update-and-restart', async () => {
547547 tearingDown = true
548548 isUpdateInProgress = true
549549
550- // Stop ToolHive and servers immediately without graceful shutdown
550+ app . removeAllListeners ( 'before-quit' )
551+ app . removeAllListeners ( 'will-quit' )
552+
553+ log . info ( '🛑 Starting graceful shutdown before update...' )
554+ mainWindow ?. webContents . send ( 'graceful-exit' )
555+
551556 try {
552557 const port = getToolhivePort ( )
553558 if ( port ) {
@@ -566,6 +571,9 @@ ipcMain.handle('install-update-and-restart', async () => {
566571 tray ?. destroy ( )
567572
568573 // Install update and restart
574+ log . info (
575+ '[restart from toast] all cleaned up, calling autoUpdater.quitAndInstall()...'
576+ )
569577 autoUpdater . quitAndInstall ( )
570578 return { success : true }
571579} )
You can’t perform that action at this time.
0 commit comments