Browse Source

skip yourself when checking zombies

Matthew R. Kasun 3 years ago
parent
commit
d7a470b030
1 changed files with 3 additions and 0 deletions
  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)