@@ -11,7 +11,7 @@ import { app, session, powerMonitor } from "electron";
11
11
import { initialize } from "@electron/remote/main/index.js" ;
12
12
import state from "./server/state.js" ;
13
13
import { electronApp , optimizer } from "@electron-toolkit/utils" ;
14
- import { retrieveNativePHPConfig , retrievePhpIniSettings , runScheduler , startAPI , startPhpApp , } from "./server/index.js" ;
14
+ import { retrieveNativePHPConfig , retrievePhpIniSettings , runScheduler , killScheduler , startAPI , startPhpApp , } from "./server/index.js" ;
15
15
import { notifyLaravel } from "./server/utils.js" ;
16
16
import { resolve } from "path" ;
17
17
import { stopAllProcesses } from "./server/api/childProcess.js" ;
@@ -22,8 +22,8 @@ const { autoUpdater } = electronUpdater;
22
22
class NativePHP {
23
23
constructor ( ) {
24
24
this . processes = [ ] ;
25
- this . schedulerInterval = undefined ;
26
25
this . mainWindow = null ;
26
+ this . schedulerInterval = undefined ;
27
27
}
28
28
bootstrap ( app , icon , phpBinary , cert ) {
29
29
initialize ( ) ;
@@ -192,6 +192,7 @@ class NativePHP {
192
192
clearInterval ( this . schedulerInterval ) ;
193
193
this . schedulerInterval = null ;
194
194
}
195
+ killScheduler ( ) ;
195
196
}
196
197
startScheduler ( ) {
197
198
const now = new Date ( ) ;
@@ -206,6 +207,7 @@ class NativePHP {
206
207
} , delay ) ;
207
208
}
208
209
killChildProcesses ( ) {
210
+ this . stopScheduler ( ) ;
209
211
this . processes
210
212
. filter ( ( p ) => p !== undefined )
211
213
. forEach ( ( process ) => {
0 commit comments