Skip to content

Commit

Permalink
Fix timed reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-developer committed Dec 21, 2024
1 parent 5b262db commit 26f6f0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions html/public.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ function getImage() {
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
console.log('broken image: ', err);
}
}
}).finally(() => {
// Use tail recursion to trigger the next invocation after `$delay` milliseconds
setTimeout(function () { getImage(); }, <?php echo $delay ?>);
});
}).finally(() => {
// Use tail recursion to trigger the next invocation after `$delay` milliseconds
setTimeout(function () { getImage(); }, <?php echo $delay ?>);
}
);
};

getImage();
Expand Down

0 comments on commit 26f6f0b

Please sign in to comment.