mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-24 09:06:03 +00:00
re-fixed session restarting
This commit is contained in:
@@ -97,13 +97,11 @@ export class SerialTabComponent extends BaseTerminalTabComponent {
|
|||||||
}))
|
}))
|
||||||
this.attachSessionHandler(this.session!.destroyed$.subscribe(() => {
|
this.attachSessionHandler(this.session!.destroyed$.subscribe(() => {
|
||||||
this.write('Press any key to reconnect\r\n')
|
this.write('Press any key to reconnect\r\n')
|
||||||
setTimeout(() => {
|
|
||||||
this.input$.pipe(first()).subscribe(() => {
|
this.input$.pipe(first()).subscribe(() => {
|
||||||
if (!this.session?.open) {
|
if (!this.session?.open) {
|
||||||
this.reconnect()
|
this.reconnect()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 100)
|
|
||||||
}))
|
}))
|
||||||
super.attachSessionHandlers()
|
super.attachSessionHandlers()
|
||||||
}
|
}
|
||||||
|
@@ -54,6 +54,9 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
|
|||||||
case 'end':
|
case 'end':
|
||||||
this.sendInput('\x1b[F' )
|
this.sendInput('\x1b[F' )
|
||||||
break
|
break
|
||||||
|
case 'restart-ssh-session':
|
||||||
|
this.reconnect()
|
||||||
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -157,11 +160,11 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
|
|||||||
if (!this.reconnectOffered) {
|
if (!this.reconnectOffered) {
|
||||||
this.reconnectOffered = true
|
this.reconnectOffered = true
|
||||||
this.write('Press any key to reconnect\r\n')
|
this.write('Press any key to reconnect\r\n')
|
||||||
setTimeout(() => {
|
this.input$.pipe(first()).subscribe(() => {
|
||||||
this.attachSessionHandler(this.input$.pipe(first()).subscribe(() => {
|
if (!this.session?.open) {
|
||||||
this.reconnect()
|
this.reconnect()
|
||||||
}))
|
}
|
||||||
}, 100)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
Reference in New Issue
Block a user