SshDaemon: Set NIO2_READ_TIMEOUT to sshd.idleTimeout

As described in SSHD-715 [1] the NIO2_READ_TIMEOUT parameter was
introduced in sshd version 1.3.

[1] https://issues.apache.org/jira/browse/SSHD-715

Bug: Issue 6173
Change-Id: I6f930cafef9583a83aed2e6d05ff2a9f27c33cb8
This commit is contained in:
David Pursehouse 2017-05-10 14:34:55 +09:00
parent c22f0fbbf3
commit 471fe93e30
1 changed files with 1 additions and 0 deletions

View File

@ -188,6 +188,7 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener {
long idleTimeoutSeconds = ConfigUtil.getTimeUnit(cfg, "sshd", null, "idleTimeout", 0, SECONDS);
getProperties().put(IDLE_TIMEOUT, String.valueOf(SECONDS.toMillis(idleTimeoutSeconds)));
getProperties().put(NIO2_READ_TIMEOUT, String.valueOf(SECONDS.toMillis(idleTimeoutSeconds)));
long rekeyTimeLimit =
ConfigUtil.getTimeUnit(cfg, "sshd", null, "rekeyTimeLimit", 3600, SECONDS);