les: drop the message if the entire p2p connection is stuck (#21033)

* les: drop the message if the entire p2p connection is stuck

* les: fix lint
This commit is contained in:
gary rong
2020-05-12 16:02:15 +08:00
committed by GitHub
parent 7ace5a3a8b
commit 53cac027d0
2 changed files with 2 additions and 23 deletions

View File

@ -262,7 +262,7 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
h.server.clientPool.requestCost(p, realCost)
}
if reply != nil {
p.mustQueueSend(func() {
p.queueSend(func() {
if err := reply.send(bv); err != nil {
select {
case p.errCh <- err: