From 95f726fb31eed5d2430c8359a514796365a077d9 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Wed, 6 Oct 2021 19:56:14 +0000 Subject: [PATCH] Fix logic --- machine.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/machine.go b/machine.go index acc9e0e2..ebe6f84b 100644 --- a/machine.go +++ b/machine.go @@ -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)