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

View file

@ -94,7 +94,10 @@ function checkForUpdates(manager) {
fetch().then((versionData) => {
if (!module.exports.isUpdateAvailable) {
// 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) {