瀏覽代碼

skip yourself when checking zombies

Matthew R. Kasun 3 年之前
父節點
當前提交
23fa1b304f
共有 1 個文件被更改,包括 3 次插入0 次删除
  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)