Skip to content

Commit feaf34b

Browse files
authored
wait for registration when terminals reconnect (microsoft#158533)
1 parent 8316ba1 commit feaf34b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
337337
this._waitForSupportedExecutions = new Promise(resolve => {
338338
once(this._onDidRegisterSupportedExecutions.event)(() => resolve());
339339
});
340-
this._register(this.onDidReconnectToTerminals(async () => await this._attemptTaskReconnection()));
340+
this._register(this.onDidReconnectToTerminals(async () => {
341+
await this._waitForSupportedExecutions;
342+
await this._attemptTaskReconnection();
343+
}));
344+
341345
this._register(this._onDidRegisterSupportedExecutions.event(async () => await this._attemptTaskReconnection()));
342346
this._upgrade();
343347
}

0 commit comments

Comments
 (0)