From 5d4f9c2637c0d6d2dc5cbf99ba71a2bc6c253dac Mon Sep 17 00:00:00 2001 From: Matteo Sessa Date: Fri, 6 Jan 2017 18:40:21 +1100 Subject: [PATCH] Fix timeout bug on long leases --- app/components/App/App.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/App/App.jsx b/app/components/App/App.jsx index 8144877..2ebe8e7 100644 --- a/app/components/App/App.jsx +++ b/app/components/App/App.jsx @@ -51,7 +51,8 @@ export default class App extends React.Component { let logoutTimeout = () => { browserHistory.push('/login'); } - if (tokenExpireDate >= 0) { + // The upper limit of setTimeout is 0x7FFFFFFF (or 2147483647 in decimal) + if (tokenExpireDate >= 0 && tokenExpireDate < 2147483648) { setTimeout(logoutTimeout, tokenExpireDate); setTimeout(twoMinuteWarningTimeout, tokenExpireDate - TWO_MINUTES); }