Skip to content

Commit

Permalink
Merge pull request #690 from Wondertan/cleanup-live-wants
Browse files Browse the repository at this point in the history
fix(bitswap/session): cleanup live wants on cancel
  • Loading branch information
gammazero authored Oct 18, 2024
2 parents c2487a2 + cb59df1 commit 043c71c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following emojis are used to highlight certain changes:
### Fixed

- `routing/http/client`: optional address and protocol filter parameters from [IPIP-484](https://github.com/ipfs/specs/pull/484) use human-readable `,` instead of `%2C`. [#688](https://github.com/ipfs/boxo/pull/688)
- `bitswap/client` Cleanup live wants when wants are canceled. This prevents live wants from continuing to get rebroadcasted even after the wants are canceled. [#690](https://github.com/ipfs/boxo/pull/690)

### Security

Expand Down
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 043c71c

Please sign in to comment.