mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-04 22:03:07 +00:00
also check for nil peers (h/t @brandonwestcott)
This commit is contained in:
parent
49274b0e8a
commit
5e883d794c
@ -231,7 +231,7 @@ func (gs *GossipSubRouter) Publish(from peer.ID, msg *pb.Message) {
|
||||
if !ok {
|
||||
// we are not in the mesh for topic, use fanout peers
|
||||
gmap, ok = gs.fanout[topic]
|
||||
if !ok {
|
||||
if !ok || len(gmap) == 0 {
|
||||
// we don't have any, pick some
|
||||
peers := gs.getPeers(topic, GossipSubD, func(peer.ID) bool { return true })
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user