Browse Source

skip yourself when checking zombies

Matthew R. Kasun 3 năm trước cách đây
mục cha
commit
23fa1b304f
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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)