Skip to content

Commit

Permalink
Merge pull request #43706 from nextcloud/backport/43701/stable28
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Feb 21, 2024
2 parents dc68447 + e34df6f commit 09c1f0d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions core/src/session-heartbeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,17 @@ const registerAutoLogout = () => {
lastActive = e.newValue
})

setInterval(function() {
let intervalId = 0
const logoutCheck = () => {
const timeout = Date.now() - config.session_lifetime * 1000
if (lastActive < timeout) {
clearTimeout(intervalId)
console.info('Inactivity timout reached, logging out')
const logoutUrl = generateUrl('/logout') + '?requesttoken=' + encodeURIComponent(getRequestToken())
window.location = logoutUrl
}
}, 1000)
}
intervalId = setInterval(logoutCheck, 1000)
}

/**
Expand Down
4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

0 comments on commit 09c1f0d

Please sign in to comment.