Allow idle monitor to be disabled

This commit is contained in:
Bryan Ashby 2019-07-08 19:49:55 -06:00
parent 1ec721212d
commit 289b32c169
No known key found for this signature in database
GPG key ID: B49EB437951D2542
2 changed files with 2 additions and 1 deletions

View file

@ -476,7 +476,7 @@ Client.prototype.startIdleMonitor = function() {
// use override value if set
idleLogoutSeconds = this.idleLogoutSecondsOverride || idleLogoutSeconds;
if(nowMs - this.lastKeyPressMs >= (idleLogoutSeconds * 1000)) {
if(idleLogoutSeconds > 0 && (nowMs - this.lastKeyPressMs >= (idleLogoutSeconds * 1000))) {
this.emit('idle timeout');
}
}, 1000 * 60);