We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19cb61e commit bd7d159Copy full SHA for bd7d159
p2p/pex/pex_reactor.go
@@ -268,7 +268,9 @@ func (r *Reactor) Receive(e p2p.Envelope) {
268
r.SendAddrs(e.Src, r.book.GetSelectionWithBias(biasToSelectNewPeers))
269
go func() {
270
// In a go-routine so it doesn't block .Receive.
271
- r.Switch.StopPeerGracefully(e.Src, r.String())
+ if r.Switch != nil && r.Switch.IsRunning() {
272
+ r.Switch.StopPeerGracefully(e.Src, r.String())
273
+ }
274
}()
275
276
} else {
0 commit comments