Closed 5d closed 2 years ago
As far as I can tell, the the delay parameter for $interval (which is just setTimeout
internally) is just a signed int32. That gives you a max delay of 2,147,483,647 milliseconds, which is nearly 25 days. BTW that setting is expressed in seconds, so the actual max value it can accept before it behaves as you described is 2147483.
Do you need an application to sit in the browser undisturbed for 25 days or more before they are considered idle?
I encountered this issue as well. One of my developers put in 900000000 on his development machine because he got tired of being signed out. When he did so, he wasn't able to sign-in anymore. We are adding validation to the setting in our UI, but it would be nice if ng-idle did its own sanity checking. I doubt anyone needs over 25 days.
Thanks for replying me, the interval with maximum 25 days is not a problem, the problem is the developer has to investigate the issue source to the library code, I agree with @heck4 , it's better to add some validations in the library.
In the source code, it adds a delay function with $interval and
options.idle
as delay interval, but it seems there is a maximum delay interval value for $interval, when thedelay interval
is too big, this delay function will be triggered right away.