[Updater > Module] Retry host update check on error, minor host cleanup

This commit is contained in:
Ducko 2022-04-04 08:28:57 +01:00
parent 668235aed9
commit 3de67cf760

View file

@ -118,11 +118,12 @@ exports.init = (endpoint, _settings, buildInfo) => {
log('Modules', 'Host error'); log('Modules', 'Host error');
checking = false; checking = false;
// die
setTimeout(() => hostUpdater.checkForUpdates(), 1000); // Retry after 1s
}); });
const platform = process.platform === 'darwin' ? 'osx' : 'linux'; const platform = process.platform === 'darwin' ? 'osx' : 'linux';
hostUpdater.setFeedURL.bind(hostUpdater)(`${endpoint}/updates/${buildInfo.releaseChannel}?platform=${platform}&version=${buildInfo.version}`); hostUpdater.setFeedURL(`${endpoint}/updates/${buildInfo.releaseChannel}?platform=${platform}&version=${buildInfo.version}`);
baseUrl = `${endpoint}/modules/${buildInfo.releaseChannel}`; baseUrl = `${endpoint}/modules/${buildInfo.releaseChannel}`;
baseQuery = { baseQuery = {