Merge pull request #3797 from thelounge/xpaw/fix-changelog-check

Pass in client manager object in update checker
This commit is contained in:
Pavel Djundik 2020-03-22 20:41:39 +02:00 committed by GitHub
commit 4bf4b7baf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

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) {