fix(ssh): prevent keepalive flooding by mapping null/0 keepaliveInterval to undefined (#11340)

This commit is contained in:
linzack
2026-06-23 14:16:05 +08:00
committed by GitHub
parent 79b3ca7e5b
commit b723fd433c
+1 -1
View File
@@ -426,7 +426,7 @@ export class SSHSession {
key: this.profile.options.algorithms[SSHAlgorithmType.HOSTKEY].filter(x => supportedAlgorithms[SSHAlgorithmType.HOSTKEY].includes(x)),
compression: this.profile.options.algorithms[SSHAlgorithmType.COMPRESSION].filter(x => supportedAlgorithms[SSHAlgorithmType.COMPRESSION].includes(x)),
},
keepaliveIntervalSeconds: Math.round(this.profile.options.keepaliveInterval / 1000),
keepaliveIntervalSeconds: this.profile.options.keepaliveInterval ? Math.round(this.profile.options.keepaliveInterval / 1000) : undefined,
keepaliveCountMax: this.profile.options.keepaliveCountMax,
connectionTimeoutSeconds: this.profile.options.readyTimeout ? Math.round(this.profile.options.readyTimeout / 1000) : undefined,
},