[ipfs/go-bitswap] Wantlist Race A
- Dominant language
- Go
- Stars
- 316
- Forks
- 163
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 8
Description
Forked from https://github.com/ipfs/go-bitswap/issues/99.
**Problem**
So, the following _could_ be happening:
1. Peer A connects to peer B, ends up with two connections.
2. Peer A sends want to peer B.
3. Peer B sends block to peer A and removes the block from the wantlist.
4. The connection used in (3) gets killed and the block gets lost in transit.
However, the peers are never disconnected so peer A never resends the wantlist.
**Solution**
* When sending a block, we could move the want to some "suspended" wantlist. If we don't receive an _unwant_ from that user within a period of time, we could send the block again.
* We should better track block send errors. As far as I can tell, we never retry but we really should. Ideally, if we keep failing, we'd close the peer's _inbound_ wantlist stream to signal "go away".
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.