diff --git a/src/main/libs/clients/MySQLClient.ts b/src/main/libs/clients/MySQLClient.ts index a2b73646..e54a6dde 100644 --- a/src/main/libs/clients/MySQLClient.ts +++ b/src/main/libs/clients/MySQLClient.ts @@ -173,13 +173,13 @@ export class MySQLClient extends BaseClient { remotePort: this._params.port }); - // dbConfig.host = this._ssh.config[0].host; + dbConfig.host = undefined; dbConfig.port = tunnel.localPort; } catch (err) { if (this._ssh) { - this._ssh.close(); this._ssh.closeTunnel(); + this._ssh.close(); } throw err; } @@ -227,8 +227,8 @@ export class MySQLClient extends BaseClient { clearInterval(this._keepaliveTimer); this._keepaliveTimer = undefined; if (this._ssh) { - this._ssh.close(); this._ssh.closeTunnel(); + this._ssh.close(); } } diff --git a/src/main/libs/clients/PostgreSQLClient.ts b/src/main/libs/clients/PostgreSQLClient.ts index 83d994d0..04f567dd 100644 --- a/src/main/libs/clients/PostgreSQLClient.ts +++ b/src/main/libs/clients/PostgreSQLClient.ts @@ -179,7 +179,7 @@ export class PostgreSQLClient extends BaseClient { remotePort: this._params.port }); - // dbConfig.host = this._ssh.config[0].host; + dbConfig.host = undefined; dbConfig.port = tunnel.localPort; } catch (err) {