Skip to content

Delayed pty host startup can cause terminal service connection state to stay connecting #185369

@Tyriar

Description

@Tyriar

Repro:

  1. Set "terminal.integrated.developer.ptyHost.startupDelay": 10000
  2. Reload window
  3. Create a terminal before pty host is connected
  4. When pty host is connected, pretty ctrl+`, 🐛 the terminal is opened but not focused.

Relevant code:

// Connect to the extension host if it's there, set the connection state to connected when
// it's done. This should happen even when there is no extension host.
this._connectionState = TerminalConnectionState.Connecting;
const isPersistentRemote = !!this._environmentService.remoteAuthority && enableTerminalReconnection;
if (isPersistentRemote) {
this._reconnectToRemoteTerminals().then(() => this._setConnected());
} else if (enableTerminalReconnection) {
this._reconnectToLocalTerminals().then(() => this._setConnected());
} else {
Promise.resolve().then(() => this._setConnected());
}

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugremoteRemote system operations issuesterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions