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

Fix timeout issue on long leases #35

Merged
merged 1 commit into from
Jan 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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