Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with hanged pseudoterminal #84181

Merged
merged 10 commits into from
Nov 19, 2019
8 changes: 6 additions & 2 deletions src/vs/workbench/api/common/extHostTerminalService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,18 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
// Processes should be initialized here for normal virtual process terminals, however for
// tasks they are responsible for attaching the virtual process to a terminal so this
// function may be called before tasks is able to attach to the terminal.
let retries = 5;
let retries = 8;
let currentTimeout = 50;
while (retries-- > 0) {
if (this._terminalProcesses[id]) {
solomatov marked this conversation as resolved.
Show resolved Hide resolved
(this._terminalProcesses[id] as ExtHostPseudoterminal).startSendingEvents(initialDimensions);
return;
}
await timeout(50);
await timeout(currentTimeout);
currentTimeout *= 2;
}

throw new Error('Wasn\'t able to start extension terminal');
}

protected _setupExtHostProcessListeners(id: number, p: ITerminalChildProcess): void {
Expand Down