requesting.go | 2 +- diff --git a/requesting.go b/requesting.go index e480ed41c5d4c65609d7dbf0c547924eb15f70b8..3b7359da6aa7e66679bf163e8c931a736c9b0cac 100644 --- a/requesting.go +++ b/requesting.go @@ -227,7 +227,7 @@ more := true requestHeap := &next.Requests t := p.t heap.Init(requestHeap) - for requestHeap.Len() != 0 && maxRequests(current.Requests.GetCardinality()) < p.nominalMaxRequests() { + for requestHeap.Len() != 0 && maxRequests(current.Requests.GetCardinality()+current.Cancelled.GetCardinality()) < p.nominalMaxRequests() { req := heap.Pop(requestHeap).(RequestIndex) existing := t.requestingPeer(req) if existing != nil && existing != p {