Pass in client manager object in update checker

This commit is contained in:
Pavel Djundik 2020-03-09 17:58:40 +02:00
parent a4ef328d8d
commit 0e62103010

View file

@ -94,7 +94,10 @@ function checkForUpdates(manager) {
fetch().then((versionData) => { fetch().then((versionData) => {
if (!module.exports.isUpdateAvailable) { if (!module.exports.isUpdateAvailable) {
// Check for updates every 24 hours + random jitter of <3 hours // Check for updates every 24 hours + random jitter of <3 hours
setTimeout(checkForUpdates, 24 * 3600 * 1000 + Math.floor(Math.random() * 10000000)); setTimeout(
() => checkForUpdates(manager),
24 * 3600 * 1000 + Math.floor(Math.random() * 10000000)
);
} }
if (!versionData.latest) { if (!versionData.latest) {