소스 검색

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)