Skip to content

Commit

Permalink
les: don't drop sentTo for normal cases (ethereum#22048)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 authored Jan 15, 2021
1 parent 3944976 commit 8d62ee6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions les/retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,13 @@ func (r *sentReq) tryRequest() {
}

defer func() {
// send feedback to server pool and remove peer if hard timeout happened
pp, ok := p.(*serverPeer)
if hrto && ok {
pp.Log().Debug("Request timed out hard")
if r.rm.peers != nil {
r.rm.peers.unregister(pp.id)
}
}

r.lock.Lock()
delete(r.sentTo, p)
r.lock.Unlock()
}()

select {
Expand Down

0 comments on commit 8d62ee6

Please sign in to comment.