Skip to content

Commit

Permalink
fix(bitswap/session): cleanup live wants on cancel
Browse files Browse the repository at this point in the history
Otherwise live wants get rebroadcasted/requested forever, even when we cancelled those.
  • Loading branch information
Wondertan committed Oct 16, 2024
1 parent 7bf89a7 commit 1e02fa0
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 1e02fa0

Please sign in to comment.