Update terminalProcessManager.ts
This commit is contained in:
parent
c59c110116
commit
c870a55b70
1 changed files with 5 additions and 1 deletions
|
@ -338,6 +338,8 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
|
|||
const useConpty = this._configHelper.config.windowsEnableConpty && !isScreenReaderModeEnabled;
|
||||
const shouldPersist = this._configHelper.config.enablePersistentSessions && !shellLaunchConfig.isFeatureTerminal;
|
||||
|
||||
// Mark the process as disconnected is the pty host is unresponsive, the responsive event
|
||||
// will fire only when the pty host was already unresponsive
|
||||
this._register(localTerminalService.onPtyHostUnresponsive(() => {
|
||||
this.isDisconnected = true;
|
||||
this._onPtyDisconnect.fire();
|
||||
|
@ -347,8 +349,10 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
|
|||
this._onPtyReconnect.fire();
|
||||
});
|
||||
this._register(toDisposable(() => this._ptyResponsiveListener?.dispose()));
|
||||
|
||||
// When the pty host restarts, reconnect is no longer possible so dispose the responsive
|
||||
// listener
|
||||
this._register(localTerminalService.onPtyHostRestart(() => {
|
||||
// When the pty host restarts, reconnect is no longer possible
|
||||
this._ptyResponsiveListener?.dispose();
|
||||
this._ptyResponsiveListener = undefined;
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue