requesting.go | 2 +- diff --git a/requesting.go b/requesting.go index 46796bd29d772f9db793991a2bb4f74373986d3f..8b9db971b537630e65dd41ca9618f8a708f6a698 100644 --- a/requesting.go +++ b/requesting.go @@ -265,7 +265,7 @@ "expected zero existing requests (%v) for update reason %q", originalRequestCount, p.needRequestUpdate)) } for requestHeap.Len() != 0 && maxRequests(current.Requests.GetCardinality()+current.Cancelled.GetCardinality()) < p.nominalMaxRequests() { - req := requestHeap.Pop() + req := heap.Pop(requestHeap) existing := t.requestingPeer(req) if existing != nil && existing != p { // Don't steal from the poor.