Fix possible race condition

Fixes #90883
This commit is contained in:
Daniel Imms
2020-02-18 07:35:30 -08:00
parent d2d4c00d3a
commit cd17694974
2 changed files with 9 additions and 9 deletions

View File

@@ -123,16 +123,16 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi
strictEnv?: boolean,
hideFromUser?: boolean
): Promise<void> {
const terminal = await this._proxy.$createTerminal({ name: this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser });
this._name = terminal.name;
this._runQueuedRequests(terminal.id);
const result = await this._proxy.$createTerminal({ name: this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser });
this._name = result.name;
this._runQueuedRequests(result.id);
}
public async createExtensionTerminal(): Promise<number> {
const terminal = await this._proxy.$createTerminal({ name: this._name, isExtensionTerminal: true });
this._name = terminal.name;
this._runQueuedRequests(terminal.id);
return terminal.id;
const result = await this._proxy.$createTerminal({ name: this._name, isExtensionTerminal: true });
this._name = result.name;
this._runQueuedRequests(result.id);
return result.id;
}
public get name(): string {