diff --git a/src/node/entry.ts b/src/node/entry.ts index 3cca62a5..c192158b 100644 --- a/src/node/entry.ts +++ b/src/node/entry.ts @@ -102,10 +102,6 @@ const main = async (args: DefaultedArgs): Promise => { throw new Error("Please pass in a password via the config file or $PASSWORD") } - ipcMain.onDispose(() => { - // TODO: register disposables - }) - const [app, server] = await createApp(args) const serverAddress = ensureAddress(server) await register(app, server, args) diff --git a/src/node/vscode.ts b/src/node/vscode.ts index 5cf826a1..aed005f9 100644 --- a/src/node/vscode.ts +++ b/src/node/vscode.ts @@ -7,6 +7,7 @@ import { arrayify, generateUuid } from "../common/util" import { rootPath } from "./constants" import { settings } from "./settings" import { isFile } from "./util" +import { ipcMain } from "./wrapper" export class VscodeProvider { public readonly serverRootPath: string @@ -16,6 +17,7 @@ export class VscodeProvider { public constructor() { this.vsRootPath = path.resolve(rootPath, "lib/vscode") this.serverRootPath = path.join(this.vsRootPath, "out/vs/server") + ipcMain.onDispose(() => this.dispose()) } public async dispose(): Promise {