Merge pull request #863 from maticnetwork/vaibhav/RequestCancellation

eth/protocols/eth: fix: remove cancelled request from tracker's list
This commit is contained in:
VaibhavJindal 2023-05-18 14:41:08 +05:30 committed by GitHub
commit 773905ec59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,6 +212,7 @@ func (p *Peer) dispatcher() {
} }
// Stop tracking the request // Stop tracking the request
delete(pending, cancelOp.id) delete(pending, cancelOp.id)
requestTracker.Fulfil(p.id, p.version, req.code, cancelOp.id)
cancelOp.fail <- nil cancelOp.fail <- nil
case resOp := <-p.resDispatch: case resOp := <-p.resDispatch: