The 'IdleStart' is triggered when the option.idle is set too large.
5d opened this issue · 3 comments
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 the delay interval
is too big, this delay function will be triggered right away.
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.