diff --git a/shared/js/background/events.js b/shared/js/background/events.js index b35021e531..c5807083f9 100644 --- a/shared/js/background/events.js +++ b/shared/js/background/events.js @@ -433,9 +433,9 @@ browserWrapper.createAlarm('clearExpiredHTTPSServiceCache', { periodInMinutes: 6 // Rotate the user agent spoofed browserWrapper.createAlarm('rotateUserAgent', { periodInMinutes: 24 * 60 }) // Rotate the sessionKey -browserWrapper.createAlarm('rotateSessionKey', { periodInMinutes: 24 * 60 }) +browserWrapper.createAlarm('rotateSessionKey', { periodInMinutes: 60 }) // Expire site breakage reports -browserWrapper.createAlarm('clearExpiredBrokenSiteReportTimes', { periodInMinutes: 24 * 60 }) +browserWrapper.createAlarm('clearExpiredBrokenSiteReportTimes', { periodInMinutes: 60 }) browser.alarms.onAlarm.addListener(async alarmEvent => { // Warning: Awaiting in this function doesn't actually wait for the promise to resolve before unblocking the main thread. diff --git a/shared/js/background/startup.js b/shared/js/background/startup.js index 8dc2c4c9db..8315badd8e 100644 --- a/shared/js/background/startup.js +++ b/shared/js/background/startup.js @@ -3,6 +3,7 @@ import { NewTabTrackerStats } from './newtab-tracker-stats' import { TrackerStats } from './classes/tracker-stats.js' import httpsStorage from './storage/https' import tdsStorage from './storage/tds' +import { clearExpiredBrokenSiteReportTimes } from './broken-site-report' const utils = require('./utils') const Companies = require('./companies') const experiment = require('./experiments') @@ -69,6 +70,8 @@ export async function onStartup () { showContextMenuAction() } + await clearExpiredBrokenSiteReportTimes() + if (resolveReadyPromise) { resolveReadyPromise() resolveReadyPromise = null