chore: attempt to kill Nitro subprocesses (#484)

This commit is contained in:
Louis 2023-10-27 16:46:18 +07:00 committed by GitHub
parent fce61f5dda
commit 1439742544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -43,6 +43,11 @@ app.on("window-all-closed", () => {
app.quit();
});
app.on("quit", () => {
dispose(requiredModules);
app.quit();
});
ipcMain.handle("setNativeThemeLight", () => {
nativeTheme.themeSource = "light";
});

View File

@ -183,7 +183,14 @@ const registerListener = () => {
events.on(EventName.OnNewMessageRequest, handleMessageRequest);
};
const killSubprocess = () => {
invokePluginFunc(MODULE_PATH, "killSubprocess");
};
const onStart = async () => {
// Try killing any existing subprocesses related to Nitro
killSubprocess();
registerListener();
};
// Register all the above functions and objects with the relevant extension points