Skip to content

Commit

Permalink
fix: bitswap cleanup live wants on cancel
Browse files Browse the repository at this point in the history
Otherwise, live wants get rebroadcasted forever, even when we canceled those.

This PR exists to have a branch to test #690
  • Loading branch information
gammazero committed Oct 17, 2024
1 parent c2487a2 commit f1d57bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bitswap/client/internal/session/sessionwants.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func (sw *sessionWants) PrepareBroadcast() []cid.Cid {
func (sw *sessionWants) CancelPending(keys []cid.Cid) {
for _, k := range keys {
sw.toFetch.Remove(k)
delete(sw.liveWants, k)
}
}

Expand Down

0 comments on commit f1d57bc

Please sign in to comment.