Explorar o código

reduce number of peer updates sent

0xdcarns %!s(int64=3) %!d(string=hai) anos
pai
achega
b3717e488b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mq/publishers.go

+ 1 - 1
mq/publishers.go

@@ -23,7 +23,7 @@ func PublishPeerUpdate(newNode *models.Node, publishToSelf bool) error {
 	}
 	for _, node := range networkNodes {
 
-		if node.IsServer == "yes" {
+		if node.IsServer == "yes" || newNode.ID == node.ID { // skip servers and self
 			continue
 		}
 		if !publishToSelf && newNode.ID == node.ID {