1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-10-17 20:05:55 +02:00

Fix logic

This commit is contained in:
Kristoffer Dalby 2021-10-06 19:56:14 +00:00
parent ba391bc2ed
commit 95f726fb31

View File

@ -231,7 +231,10 @@ func (h *Headscale) isOutdated(m *Machine) bool {
Time("last_successful_update", *m.LastSuccessfulUpdate).
Time("last_state_change", lastChange).
Msgf("Checking if %s is missing updates", m.Name)
return m.LastSuccessfulUpdate.Before(lastChange)
// Only return if we have a shared node with a newer update.
if m.LastSuccessfulUpdate.Before(lastChange) {
return true
}
}
lastChange := h.getLastStateChange(m.Namespace.Name)