M. J. Fromberger
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
internal/p2p/pex/reactor.go
|
|
@ -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: |
|
|
|
} |
|
|
|
} |
|
|
|
}() |
|
|
|