mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-20 06:52:30 +00:00
p2p: avoid blocking on the dequeCh (#6765)
This commit is contained in:
@@ -257,7 +257,11 @@ func (s *pqScheduler) process() {
|
||||
s.metrics.PeerSendBytesTotal.With(
|
||||
"chID", chIDStr,
|
||||
"peer_id", string(pqEnv.envelope.To)).Add(float64(pqEnv.size))
|
||||
s.dequeueCh <- pqEnv.envelope
|
||||
select {
|
||||
case s.dequeueCh <- pqEnv.envelope:
|
||||
case <-s.closer.Done():
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
case <-s.closer.Done():
|
||||
|
||||
Reference in New Issue
Block a user