Skip to content

Commit

Permalink
chore: add comment on cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Mar 2, 2023
1 parent 2d4638e commit 5cbf34a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ async function batchResponse ({ blocks, context, logger }) {
}

try {
logger.info({ key: context.canceled }, 'batch response')
let message = new Message()
for (let i = 0; i < blocks.length; i++) {
const block = blocks[i]
Expand All @@ -203,6 +204,7 @@ async function batchResponse ({ blocks, context, logger }) {
telemetry.increaseLabelCount('bitswap-block-success-cancel', [block.type])
telemetry.increaseLabelCount('bitswap-cancel-size', [block.type], size)

logger.info({ key: block.key }, 'delete')
context.canceled.delete(block.key)
}
}
Expand Down

0 comments on commit 5cbf34a

Please sign in to comment.