mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-02 11:44:01 +03:00
close forwarded ports when session dies (fixes #2143)
This commit is contained in:
parent
50959f4490
commit
0ca0996493
@ -87,6 +87,13 @@ export class SSHSession extends BaseSession {
|
|||||||
constructor (public connection: SSHConnection) {
|
constructor (public connection: SSHConnection) {
|
||||||
super()
|
super()
|
||||||
this.scripts = connection.scripts || []
|
this.scripts = connection.scripts || []
|
||||||
|
this.destroyed$.subscribe(() => {
|
||||||
|
for (const port of this.forwardedPorts) {
|
||||||
|
if (port.type === PortForwardType.Local) {
|
||||||
|
port.stopLocalListener()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async start (): Promise<void> {
|
async start (): Promise<void> {
|
||||||
|
Loading…
Reference in New Issue
Block a user