Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
ActivityMonitor: cap the intervalue by max 32bit integer to avoid GUI…
Browse files Browse the repository at this point in the history
… hanging if php session.gc_maxlifetime is too big. Should fix #639
  • Loading branch information
cdujeu committed Sep 15, 2014
1 parent 7590b7e commit 6fefa80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -47,7 +47,7 @@ Class.create("ActivityMonitor", {
}
if(clientSessionTime == -1){
this._renewTime = serverSessionTime - this._renewMinutes*60;
this.serverInterval = window.setInterval(this.serverObserver.bind(this), this._renewTime*1000);
this.serverInterval = window.setInterval(this.serverObserver.bind(this), Math.min((Math.pow(2,31)-1), this._renewTime*1000));
return;
}
this._serverSessionTime = serverSessionTime;
Expand Down Expand Up @@ -78,7 +78,7 @@ Class.create("ActivityMonitor", {
$(document.body).observe("mousemove", activityObserver );
document.observe("ajaxplorer:server_answer", activityObserver );
this.interval = window.setInterval(this.idleObserver.bind(this), 5000);
this.serverInterval = window.setInterval(this.serverObserver.bind(this), this._renewTime*1000);
this.serverInterval = window.setInterval(this.serverObserver.bind(this), Math.min((Math.pow(2,31)-1), this._renewTime*1000));
}
}.bind(this));
document.observe("ajaxplorer:longtask_starting", function(){
Expand Down

0 comments on commit 6fefa80

Please sign in to comment.