Explorar el Código

skip yourself when checking zombies

Matthew R. Kasun hace 3 años
padre
commit
23fa1b304f
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      logic/zombie.go

+ 3 - 0
logic/zombie.go

@@ -84,6 +84,9 @@ func InitalizeZombies() {
 			continue
 		}
 		for _, othernode := range othernodes {
+			if node.ID == othernode.ID {
+				continue
+			}
 			if node.MacAddress == othernode.MacAddress {
 				if node.LastCheckIn > othernode.LastCheckIn {
 					zombies = append(zombies, othernode.ID)