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

This commit is contained in:
gary rong 2021-01-16 06:04:38 +08:00 committed by GitHub
parent 3944976a9a
commit 8d62ee65b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -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 {