8000 fix(pty): kill all PTYs on will-quit to prevent MSVC assertion crash by schroldgames · Pull Request #51 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,10 @@ app.on('before-quit', () => {
});

app.on('will-quit', () => {
// Kill all PTYs before anything else tears down. Without this, node-pty's
// libuv async handles (batons) are still pending when the process exits,
// triggering the "Assertion failed: remove_pty_baton" MSVC runtime error.
ptyManager.killAll();
pipeServer.stop();
cdpProxy.stop();
portScanner.stop();
Expand Down
0