Skip to content

Commit

Permalink
fix: resolve batch when missing response
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Oct 17, 2022
1 parent be9e1ee commit cb91670
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/blockstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export class BatchingR2Blockstore extends R2Blockstore {
console.log(`requesting ${batch.length} blocks from ${carCid} (${range.length} bytes @ ${range.offset})`)
const res = await this._dataBucket.get(carPath, { range })
if (!res) {
// TODO: resolve batchBlocks to undefined
for (const blocks of batchBlocks.values()) {
blocks.forEach(b => b.resolve())
}
return
}

Expand Down

0 comments on commit cb91670

Please sign in to comment.