From 1e02fa071c95e828a67df6e34d38385a8dc6f727 Mon Sep 17 00:00:00 2001 From: Wondertan Date: Mon, 14 Oct 2024 06:57:57 +0200 Subject: [PATCH 1/3] fix(bitswap/session): cleanup live wants on cancel Otherwise live wants get rebroadcasted/requested forever, even when we cancelled those. --- bitswap/client/internal/session/sessionwants.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bitswap/client/internal/session/sessionwants.go b/bitswap/client/internal/session/sessionwants.go index 0d4ded013..ace8cd952 100644 --- a/bitswap/client/internal/session/sessionwants.go +++ b/bitswap/client/internal/session/sessionwants.go @@ -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) } } From da0654d3833e42d53fd287d536ebbe61807a0c6b Mon Sep 17 00:00:00 2001 From: gammazero <11790789+gammazero@users.noreply.github.com> Date: Fri, 18 Oct 2024 07:43:56 -1000 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 309668ded..c3b0c3dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. ### Security From cb59df17ff33c4169b8de0a2a878aa9704f863ce Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 18 Oct 2024 19:50:52 +0200 Subject: [PATCH 3/3] chore: CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3b0c3dc3..0f6d53c7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +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. +- `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