This commit is contained in:
Koen Kanters 2021-08-17 16:45:20 +02:00
parent 773de25657
commit 486333d342

View File

@ -67,10 +67,10 @@ class AvailabilityNew extends ExtensionTS {
try { try {
await re.device.ping(); await re.device.ping();
pingedSuccessfully = true; pingedSuccessfully = true;
logger.debug(`Succesfully pinged '${re.name}' (attemp ${i + 1}/${attempts})`); logger.debug(`Succesfully pinged '${re.name}' (attempt ${i + 1}/${attempts})`);
break; break;
} catch (error) { } catch (error) {
logger.error(`Failed to ping '${re.name}' (attemp ${i + 1}/${attempts}, ${error.message})`); logger.error(`Failed to ping '${re.name}' (attempt ${i + 1}/${attempts}, ${error.message})`);
// Try again in 3 seconds. // Try again in 3 seconds.
const lastAttempt = i - 1 === attempts; const lastAttempt = i - 1 === attempts;
!lastAttempt && await sleep(3); !lastAttempt && await sleep(3);