skip yourself when checking zombies

This commit is contained in:
Matthew R. Kasun 2022-06-13 15:27:49 -04:00
parent efb06f37f7
commit d7a470b030

View file

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