diff --git a/src/common/interfaces/antares.ts b/src/common/interfaces/antares.ts index 9bb4ed8a..bf8fd167 100644 --- a/src/common/interfaces/antares.ts +++ b/src/common/interfaces/antares.ts @@ -64,6 +64,7 @@ export interface ConnectionParams { sshKey?: string; sshPort?: number; sshPassphrase?: string; + sshKeepAliveInterval?: number; } export interface TypeInformations { diff --git a/src/main/ipc-handlers/connection.ts b/src/main/ipc-handlers/connection.ts index 318a0e6d..71732c65 100644 --- a/src/main/ipc-handlers/connection.ts +++ b/src/main/ipc-handlers/connection.ts @@ -23,6 +23,7 @@ export default (connections: {[key: string]: antares.Client}) => { port: number; privateKey: string; passphrase: string; + keepaliveInterval: number; } }; @@ -49,7 +50,8 @@ export default (connections: {[key: string]: antares.Client}) => { password: conn.sshPass, port: conn.sshPort ? conn.sshPort : 22, privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null, - passphrase: conn.sshPassphrase + passphrase: conn.sshPassphrase, + keepaliveInterval: conn.sshKeepAliveInterval ?? 30*60*1000 }; } @@ -98,6 +100,7 @@ export default (connections: {[key: string]: antares.Client}) => { port: number; privateKey: string; passphrase: string; + keepaliveInterval: number; } }; @@ -127,7 +130,8 @@ export default (connections: {[key: string]: antares.Client}) => { password: conn.sshPass, port: conn.sshPort ? conn.sshPort : 22, privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null, - passphrase: conn.sshPassphrase + passphrase: conn.sshPassphrase, + keepaliveInterval: conn.sshKeepAliveInterval ?? 30*60*1000 }; } diff --git a/src/main/libs/clients/MySQLClient.ts b/src/main/libs/clients/MySQLClient.ts index 403505e7..c4594a60 100644 --- a/src/main/libs/clients/MySQLClient.ts +++ b/src/main/libs/clients/MySQLClient.ts @@ -155,7 +155,6 @@ export class MySQLClient extends AntaresCore { this._ssh = new SSH2Promise({ ...this._params.ssh, - keepaliveInterval: 30*60*1000, debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null }); diff --git a/src/main/libs/clients/PostgreSQLClient.ts b/src/main/libs/clients/PostgreSQLClient.ts index c12762c4..3dbc4b10 100644 --- a/src/main/libs/clients/PostgreSQLClient.ts +++ b/src/main/libs/clients/PostgreSQLClient.ts @@ -167,7 +167,6 @@ export class PostgreSQLClient extends AntaresCore { try { this._ssh = new SSH2Promise({ ...this._params.ssh, - keepaliveInterval: 30*60*1000, debug: process.env.NODE_ENV !== 'production' ? (s) => console.log(s) : null }); diff --git a/src/renderer/components/WorkspaceAddConnectionPanel.vue b/src/renderer/components/WorkspaceAddConnectionPanel.vue index da2803a6..391cd8f7 100644 --- a/src/renderer/components/WorkspaceAddConnectionPanel.vue +++ b/src/renderer/components/WorkspaceAddConnectionPanel.vue @@ -33,10 +33,10 @@