Skip to content

Commit

Permalink
Update script.js (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
abbottc authored and jpic committed Dec 22, 2017
1 parent fe893bb commit 6249e41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion session_security/static/session_security/script.js
Expand Up @@ -136,7 +136,10 @@ yourlabs.SessionSecurity.prototype = {
nextPing = this.warnAfter - idleFor;
}

this.timeout = setTimeout($.proxy(this.ping, this), nextPing * 1000);
// setTimeout expects the timeout value not to exceed
// a 32-bit unsigned int, so cap the value
var milliseconds = Math.min(nextPing * 1000, 2147483647)
this.timeout = setTimeout($.proxy(this.ping, this), milliseconds);
},

// onbeforeunload handler.
Expand Down

0 comments on commit 6249e41

Please sign in to comment.