SshDaemon: Set up the session timeout to make sshd.idleTimeout work

SshServer#start() sets up the session timeout by calling:

  setupSessionTimeout(sessionFactory);

but SshDaemon overrides the start() method, does not call super(), and
does not call setupSessionTimeout.

Therefore, no session timeout is set up on ssh sessions, and sessions
continue to be kept open beyond the timeout specified in the configured
sshd.idleTimeout.

Change-Id: Ia72980d3f0f700386f62d301164f61f32405528e
(cherry picked from commit b150ce534a)
This commit is contained in:
David Pursehouse 2016-08-03 17:47:23 +09:00
parent 776e004f05
commit f57d2b8f83
1 changed files with 1 additions and 0 deletions

View File

@ -304,6 +304,7 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener {
sessionFactory = createSessionFactory();
}
sessionFactory.setServer(this);
setupSessionTimeout(sessionFactory);
daemonAcceptor = createAcceptor();
try {