change delay to 10s for initial retries, also remove space between time and units

pull/1007/head
Ryan Tharp 5 years ago
parent 91b254d355
commit cf5e186bcd

@ -16,7 +16,7 @@
LokiFileServerAPI.secureRpcPubKey LokiFileServerAPI.secureRpcPubKey
); );
let nextWaitSeconds = 1; let nextWaitSeconds = 10;
const checkForUpgrades = async () => { const checkForUpgrades = async () => {
const result = await window.tokenlessFileServerAdnAPI.serverRequest( const result = await window.tokenlessFileServerAdnAPI.serverRequest(
'loki/v1/version/client/desktop' 'loki/v1/version/client/desktop'
@ -67,9 +67,7 @@
return res(expiredVersion); return res(expiredVersion);
} }
log.info( log.info(
'Delaying sending checks for', `Delaying sending checks for ${nextWaitSeconds}s, no version yet`
nextWaitSeconds,
's, no version yet'
); );
setTimeout(waitForVersion, nextWaitSeconds * 1000); setTimeout(waitForVersion, nextWaitSeconds * 1000);
return true; return true;
@ -85,11 +83,7 @@
window.extension.expired = cb => { window.extension.expired = cb => {
if (expiredVersion === null) { if (expiredVersion === null) {
// just give it another second // just give it another second
log.info( log.info(`Delaying expire banner determination for ${nextWaitSeconds}s`);
'Delaying expire banner determination for',
nextWaitSeconds,
's'
);
setTimeout(() => { setTimeout(() => {
window.extension.expired(cb); window.extension.expired(cb);
}, nextWaitSeconds * 1000); }, nextWaitSeconds * 1000);

Loading…
Cancel
Save