Skip to content

Commit d072a02

Browse files
authored
Merge pull request #359 from leung018/keep-service-worker-alive
Adjust periodInMinutes
2 parents 8650162 + 096e311 commit d072a02

File tree

1 file changed

+1
-1
lines changed
  • apps/extension/src/service-workers

1 file changed

+1
-1
lines changed

apps/extension/src/service-workers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default function main() {
8383
const now = new Date()
8484
browser.alarms.create('immediate', { when: now.getTime() })
8585
browser.alarms.create('recurring', {
86-
periodInMinutes: 1,
86+
periodInMinutes: 0.5, // Set to 30 seconds can help to keep the service worker alive. I think some bugs or performance issue appear when service worker don't keep alive.
8787
when: getStartOfNextMinute(now).getTime()
8888
})
8989
browser.alarms.clear() // Remove old alarm in previous version, if any

0 commit comments

Comments
 (0)