Skip to content

Commit 9760c09

Browse files
committed
ignore last checkin if time is zero
1 parent 9804366 commit 9760c09

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

logic/peers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
194194
continue
195195
}
196196

197-
if !node.Connected || node.PendingDelete || node.Action == models.NODE_DELETE || time.Since(node.LastCheckIn) > time.Hour {
197+
if !node.Connected || node.PendingDelete || node.Action == models.NODE_DELETE ||
198+
(!node.LastCheckIn.IsZero() && time.Since(node.LastCheckIn) > time.Hour) {
198199
continue
199200
}
200201
acls, _ := ListAclsByNetwork(models.NetworkID(node.Network))

0 commit comments

Comments
 (0)