Skip to content

Commit 396af23

Browse files
committed
Kill VS Code when process exits
This is to ensure it doesn't hang around.
1 parent 34225e2 commit 396af23

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/node/entry.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ const main = async (args: DefaultedArgs): Promise<void> => {
102102
throw new Error("Please pass in a password via the config file or $PASSWORD")
103103
}
104104

105-
ipcMain.onDispose(() => {
106-
// TODO: register disposables
107-
})
108-
109105
const [app, server] = await createApp(args)
110106
const serverAddress = ensureAddress(server)
111107
await register(app, server, args)

src/node/vscode.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { arrayify, generateUuid } from "../common/util"
77
import { rootPath } from "./constants"
88
import { settings } from "./settings"
99
import { isFile } from "./util"
10+
import { ipcMain } from "./wrapper"
1011

1112
export class VscodeProvider {
1213
public readonly serverRootPath: string
@@ -16,6 +17,7 @@ export class VscodeProvider {
1617
public constructor() {
1718
this.vsRootPath = path.resolve(rootPath, "lib/vscode")
1819
this.serverRootPath = path.join(this.vsRootPath, "out/vs/server")
20+
ipcMain.onDispose(() => this.dispose())
1921
}
2022

2123
public async dispose(): Promise<void> {

0 commit comments

Comments
 (0)