Closed guillaumemichel closed 1 year ago
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
Finally, remember to use https://discuss.ipfs.io if you just need general support.
The issue doesn't come from go-bitswap
Cancelling the (parent) context of the
GetBlock()
/GetBlocks()
methods makes Bitswap client fail constantly on future requests.The following example illustrates the issue.
kubo
is slightly modified and runs the following.If the bitswap request doesn't succeed in the 5 seconds, it will abort as expected and the function will return. However, all future bitswap requests will systematically fail, which is unexpected.
The following code snippet works as expected for multiple requests.
Something must be wrong in the Bitswap client implementation, probably in the way Sessions shutdown is handled in session.go.