re-fixed session restarting

This commit is contained in:
Eugene Pankov
2021-02-13 12:47:21 +01:00
parent 9c87cf3f3a
commit 9b5b5a9d00
2 changed files with 12 additions and 11 deletions

View File

@@ -97,13 +97,11 @@ export class SerialTabComponent extends BaseTerminalTabComponent {
}))
this.attachSessionHandler(this.session!.destroyed$.subscribe(() => {
this.write('Press any key to reconnect\r\n')
setTimeout(() => {
this.input$.pipe(first()).subscribe(() => {
if (!this.session?.open) {
this.reconnect()
}
})
}, 100)
this.input$.pipe(first()).subscribe(() => {
if (!this.session?.open) {
this.reconnect()
}
})
}))
super.attachSessionHandlers()
}