Skip to content

Commit

Permalink
Merge pull request #188 from quorumcontrol/heartbeat-race
Browse files Browse the repository at this point in the history
Fix gossipsub race condition for heartbeat
  • Loading branch information
vyzo committed May 28, 2019
2 parents 49274b0 + 5e883d7 commit 4221a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gossipsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 })

Expand Down

0 comments on commit 4221a39

Please sign in to comment.