Move isOutdated logic to updateChan consumation

This commit is contained in:
Kristoffer Dalby
2021-08-19 18:05:33 +01:00
parent dd8c0d1e9e
commit 8d1adaaef3
2 changed files with 26 additions and 25 deletions

View File

@@ -315,6 +315,11 @@ func (h *Headscale) requestUpdate(m *tailcfg.Node) error {
}
func (h *Headscale) isOutdated(m *Machine) bool {
err := h.UpdateMachine(m)
if err != nil {
return true
}
lastChange := h.getLastStateChange()
log.Trace().
Str("func", "keepAlive").