mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-20 19:09:07 +01:00
Fix logic
This commit is contained in:
parent
ba391bc2ed
commit
95f726fb31
@ -231,7 +231,10 @@ func (h *Headscale) isOutdated(m *Machine) bool {
|
|||||||
Time("last_successful_update", *m.LastSuccessfulUpdate).
|
Time("last_successful_update", *m.LastSuccessfulUpdate).
|
||||||
Time("last_state_change", lastChange).
|
Time("last_state_change", lastChange).
|
||||||
Msgf("Checking if %s is missing updates", m.Name)
|
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)
|
lastChange := h.getLastStateChange(m.Namespace.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user