Skip to content

Commit 1e02fa0

Browse files
committed
fix(bitswap/session): cleanup live wants on cancel
Otherwise live wants get rebroadcasted/requested forever, even when we cancelled those.
1 parent 7bf89a7 commit 1e02fa0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bitswap/client/internal/session/sessionwants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ func (sw *sessionWants) PrepareBroadcast() []cid.Cid {
148148
func (sw *sessionWants) CancelPending(keys []cid.Cid) {
149149
for _, k := range keys {
150150
sw.toFetch.Remove(k)
151+
delete(sw.liveWants, k)
151152
}
152153
}
153154

0 commit comments

Comments
 (0)