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:
@@ -168,7 +168,10 @@ export class MySQLClient 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;
|
||||
}
|
||||
}
|
||||
@@ -187,7 +190,10 @@ export class MySQLClient 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();
|
||||
}
|
||||
}
|
||||
|
||||
async getConnection () {
|
||||
|
Reference in New Issue
Block a user