mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
fix: ssh tunnel keep-alive not working properly
This commit is contained in:
@ -180,7 +180,10 @@ export class PostgreSQLClient extends BaseClient {
|
||||
dbConfig.port = tunnel.localPort;
|
||||
}
|
||||
catch (err) {
|
||||
if (this._ssh) this._ssh.close();
|
||||
if (this._ssh) {
|
||||
this._ssh.close();
|
||||
this._ssh.closeTunnel();
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
@ -236,7 +239,10 @@ export class PostgreSQLClient extends BaseClient {
|
||||
this._connection.end();
|
||||
clearInterval(this._keepaliveTimer);
|
||||
this._keepaliveTimer = undefined;
|
||||
if (this._ssh) this._ssh.close();
|
||||
if (this._ssh) {
|
||||
this._ssh.close();
|
||||
this._ssh.closeTunnel();
|
||||
}
|
||||
}
|
||||
|
||||
private async keepAlive () {
|
||||
|
Reference in New Issue
Block a user