Skip to content

Commit 60080aa

Browse files
committed
chore(core): fix typo in session heartbeat service
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent bc784d7 commit 60080aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/session-heartbeat.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface OcJsConfig {
2323
const {
2424
auto_logout: autoLogout,
2525
session_keepalive: keepSessionAlive,
26-
session_lifetime: seesionLifetime,
26+
session_lifetime: sessionLifetime,
2727
} = loadState<Partial<OcJsConfig>>('core', 'config', {})
2828

2929
/**
@@ -76,8 +76,8 @@ export function initSessionHeartBeat() {
7676
* Get interval in seconds
7777
*/
7878
function getInterval(): number {
79-
const interval = seesionLifetime
80-
? Math.floor(seesionLifetime / 2)
79+
const interval = sessionLifetime
80+
? Math.floor(sessionLifetime / 2)
8181
: 900
8282

8383
// minimum one minute, max 24 hours, default 15 minutes
@@ -146,7 +146,7 @@ function registerAutoLogout() {
146146

147147
let intervalId = 0
148148
const logoutCheck = () => {
149-
const timeout = Date.now() - (seesionLifetime ?? 86400) * 1000
149+
const timeout = Date.now() - (sessionLifetime ?? 86400) * 1000
150150
if (lastActive < timeout) {
151151
clearTimeout(intervalId)
152152
logger.info('Inactivity timout reached, logging out')

0 commit comments

Comments
 (0)