Skip to content

Commit 808e1a2

Browse files
committed
try a retry delay
1 parent 6d1f80f commit 808e1a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/js/tabs/onboard_logging.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ onboard_logging.initialize = function (callback) {
493493

494494
// START PATCH: minimal retry for null/missing blocks
495495
const MAX_SIMPLE_RETRIES = 5;
496+
const RETRY_BACKOFF_MS = 30; // 30 ms delay for retries
496497
let simpleRetryCount = 0;
497498

498499
const startTime = new Date().getTime(); // Start timestamp
@@ -533,7 +534,9 @@ onboard_logging.initialize = function (callback) {
533534
if (simpleRetryCount % 2 === 1) {
534535
console.warn(`Null/missing block at ${nextAddress}, retry ${simpleRetryCount}`);
535536
}
536-
mspHelper.dataflashRead(nextAddress, self.blockSize, onChunkRead);
537+
setTimeout(() => {
538+
mspHelper.dataflashRead(nextAddress, self.blockSize, onChunkRead);
539+
}, RETRY_BACKOFF_MS);
537540
} else {
538541
console.error(
539542
`Skipping null block at ${nextAddress} after ${MAX_SIMPLE_RETRIES} retries`,

0 commit comments

Comments
 (0)