Skip to content

Commit

Permalink
increase live threshold to 60s
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-fei committed Jan 23, 2024
1 parent fafd176 commit a6ddaaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ tracking pageviews from ${options.SITE_BASE_URL}\n`)

setInterval(() => {
Object.keys(live).forEach(visitor => {
if (live[visitor] && live[visitor].heartbeat < Date.now() - 15000) delete live[visitor]
if (live[visitor] && live[visitor].heartbeat < Date.now() - 60000) delete live[visitor]
})
sendSSE(JSON.stringify(live), connections)
}, 5000)
Expand Down

0 comments on commit a6ddaaa

Please sign in to comment.