File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export class PowerShellProcess {
1515 private static warnUserThreshold = 30 ;
1616
1717 public onExited : vscode . Event < void > ;
18- private onExitedEmitter = new vscode . EventEmitter < void > ( ) ;
18+ private onExitedEmitter ?: vscode . EventEmitter < void > ;
1919
2020 private consoleTerminal ?: vscode . Terminal ;
2121 private consoleCloseSubscription ?: vscode . Disposable ;
@@ -31,6 +31,7 @@ export class PowerShellProcess {
3131 private sessionFilePath : vscode . Uri ,
3232 private sessionSettings : Settings ) {
3333
34+ this . onExitedEmitter = new vscode . EventEmitter < void > ( ) ;
3435 this . onExited = this . onExitedEmitter . event ;
3536 }
3637
@@ -149,6 +150,9 @@ export class PowerShellProcess {
149150
150151 void this . deleteSessionFile ( this . sessionFilePath ) ;
151152
153+ this . onExitedEmitter ?. fire ( ) ;
154+ this . onExitedEmitter = undefined ;
155+
152156 this . consoleTerminal ?. dispose ( ) ;
153157 this . consoleTerminal = undefined ;
154158
@@ -230,7 +234,6 @@ export class PowerShellProcess {
230234 }
231235
232236 this . logger . writeWarning ( `PowerShell process terminated or Extension Terminal was closed, PID: ${ this . pid } ` ) ;
233- this . onExitedEmitter . fire ( ) ;
234237 this . dispose ( ) ;
235238 }
236239}
Original file line number Diff line number Diff line change @@ -530,13 +530,13 @@ export class SessionManager implements Middleware {
530530 this . sessionSettings ) ;
531531
532532 languageServerProcess . onExited (
533- async ( ) => {
533+ ( ) => {
534534 LanguageClientConsumer . onLanguageClientExited ( ) ;
535535
536536 if ( this . sessionStatus === SessionStatus . Running
537537 || this . sessionStatus === SessionStatus . Busy ) {
538538 this . setSessionStatus ( "Session Exited!" , SessionStatus . Failed ) ;
539- await this . promptForRestart ( ) ;
539+ void this . promptForRestart ( ) ;
540540 }
541541 } ) ;
542542
You can’t perform that action at this time.
0 commit comments