Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Commit

Permalink
Merge pull request #35 from cotdsa/fix_large_timeout
Browse files Browse the repository at this point in the history
Fix timeout issue on long leases
  • Loading branch information
Lucretius authored Jan 6, 2017
2 parents 9c3fd9b + 5d4f9c2 commit dc6d919
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/App/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit dc6d919

Please sign in to comment.