les: don't drop sentTo for normal cases (#22048)

pull/22181/head
gary rong 4 years ago committed by GitHub
parent 3944976a9a
commit 8d62ee65b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      les/retrieve.go

@ -337,7 +337,6 @@ func (r *sentReq) tryRequest() {
} }
defer func() { defer func() {
// send feedback to server pool and remove peer if hard timeout happened
pp, ok := p.(*serverPeer) pp, ok := p.(*serverPeer)
if hrto && ok { if hrto && ok {
pp.Log().Debug("Request timed out hard") pp.Log().Debug("Request timed out hard")
@ -345,10 +344,6 @@ func (r *sentReq) tryRequest() {
r.rm.peers.unregister(pp.id) r.rm.peers.unregister(pp.id)
} }
} }
r.lock.Lock()
delete(r.sentTo, p)
r.lock.Unlock()
}() }()
select { select {

Loading…
Cancel
Save