Fix condition to check if request is head

This commit is contained in:
rjl493456442 2025-12-10 15:05:49 +08:00 committed by GitHub
parent 9f62d3b188
commit 943c61f424
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -185,7 +185,7 @@ func (t *Tracker) Fulfil(peer string, version uint, code uint64, id uint64) {
return
}
// Everything matches, mark the request serviced and meter it
wasHead := t.expire.Front() == req.expire
wasHead := req.expire.Prev() == nil
t.expire.Remove(req.expire)
delete(t.pending, id)
if wasHead {