mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-15 23:16:34 +00:00
Merge pull request #1846 from balena-os/fix-already-delayed-by
Fix the "already delayed by" calculation
This commit is contained in:
commit
ab59a18534
@ -135,7 +135,7 @@ export class BalenaLogBackend extends LogBackend {
|
||||
MAX_COOLDOWN_PERIOD,
|
||||
);
|
||||
// Work out how much of a delay has already occurred since the last attempt
|
||||
const alreadyDelayedBy = this.lastSetupAttempt - Date.now();
|
||||
const alreadyDelayedBy = Date.now() - this.lastSetupAttempt;
|
||||
// The difference between the two is the actual delay we want
|
||||
const delay = Math.max(totalDelay - alreadyDelayedBy, 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user