mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-20 06:06:15 +00:00
pex: do not send nil envelopes to the reactor (#7622)
This commit is contained in:
@@ -171,10 +171,14 @@ func (r *Reactor) processPexCh(ctx context.Context) {
|
||||
defer close(incoming)
|
||||
iter := r.pexCh.Receive(ctx)
|
||||
for iter.Next(ctx) {
|
||||
env := iter.Envelope()
|
||||
if env == nil {
|
||||
break
|
||||
}
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case incoming <- iter.Envelope():
|
||||
case incoming <- env:
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user