File tree 1 file changed +11
-4
lines changed
frontend/express/public/javascripts/countly
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1198,10 +1198,14 @@ var AppRouter = Backbone.Router.extend({
1198
1198
}
1199
1199
else if ( result == "success" ) {
1200
1200
shouldRecordAction = false ;
1201
+ var myTimeoutValue = parseInt ( countlyGlobal . config [ "session_timeout" ] ) * 1000 * 60 ;
1202
+ if ( myTimeoutValue > 2147483647 ) { //max value used by set timeout function
1203
+ myTimeoutValue = 1800000 ; //30 minutes
1204
+ }
1201
1205
setTimeout ( function ( ) {
1202
1206
shouldRecordAction = true ;
1203
- } , Math . round ( parseInt ( countlyGlobal . config [ "session_timeout" ] ) / 2 ) * 1000 * 60 ) ;
1204
- resetSessionTimeouts ( parseInt ( countlyGlobal . config [ "session_timeout" ] ) * 1000 * 60 ) ;
1207
+ } , Math . round ( myTimeoutValue / 2 ) ) ;
1208
+ resetSessionTimeouts ( myTimeoutValue ) ;
1205
1209
}
1206
1210
}
1207
1211
} ) ;
@@ -1236,8 +1240,11 @@ var AppRouter = Backbone.Router.extend({
1236
1240
extendSession ( ) ;
1237
1241
} , timeout + 1000 ) ;
1238
1242
} ;
1239
-
1240
- resetSessionTimeouts ( parseInt ( countlyGlobal . config [ "session_timeout" ] ) * 1000 * 60 ) ;
1243
+
1244
+ var myTimeoutValue = parseInt ( countlyGlobal . config [ "session_timeout" ] ) * 1000 * 60 ;
1245
+ if ( myTimeoutValue > 2147483647 ) //max value used by set timeout function
1246
+ myTimeoutValue = 1800000 ; //30 minutes
1247
+ resetSessionTimeouts ( myTimeoutValue ) ;
1241
1248
$ ( document ) . on ( "click mousemove extend-dashboard-user-session" , function ( event ) {
1242
1249
if ( shouldRecordAction )
1243
1250
extendSession ( ) ;
You can’t perform that action at this time.
0 commit comments