Skip to content

Commit

Permalink
If no status updates to emit include a few known nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworksoul committed Jan 8, 2017
1 parent 5ab9078 commit ff89185
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions membership.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@ func transmitVerbGenericUDP(node *Node, forwardTo *Node, verb messageVerb, code

// Add members for update.
nodes := getRandomUpdatedNodes(pingRequestCount(), node, thisHost)

// No updates to distribute? Send out a few updates on other known nodes.
if len(nodes) == 0 {
nodes = knownNodes.getRandomNodes(pingRequestCount(), node, thisHost)
}

for _, n := range nodes {
err = msg.addMember(n, n.status, n.heartbeat)

Expand Down

0 comments on commit ff89185

Please sign in to comment.