mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
fix(electron): potential crash on quit (#8855)
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
|
||||
import type { HelperToMain, MainToHelper } from '../shared/type';
|
||||
import { MessageEventChannel } from '../shared/utils';
|
||||
import { beforeAppQuit } from './cleanup';
|
||||
import { logger } from './logger';
|
||||
|
||||
const HELPER_PROCESS_PATH = path.join(__dirname, './helper.js');
|
||||
@@ -65,7 +66,7 @@ class HelperProcessManager {
|
||||
});
|
||||
});
|
||||
|
||||
app.on('before-quit', () => {
|
||||
beforeAppQuit(() => {
|
||||
this.#process.kill();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user