js/comm/sessionwatcher/sessionwatcher.js in rsence-2.1.9 vs js/comm/sessionwatcher/sessionwatcher.js in rsence-2.1.10
- old
+ new
@@ -36,10 +36,11 @@
},
// Tells the server the client's current time
onIdle: function(){
- if((new Date().getTime() - this.sesTimeoutValue.value) > this.timeoutSecs ){
- this.sesTimeoutValue.set( new Date().getTime() );
+ var now = new Date().getTime();
+ if((now - this.sesTimeoutValue.value) > this.timeoutSecs ){
+ this.sesTimeoutValue.set( now );
}
}
});