mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-13 02:55:11 +08:00
Use new update state logic for derp maps
This commit is contained in:
parent
e0ef601123
commit
a050158d11
1 changed files with 1 additions and 10 deletions
11
derp.go
11
derp.go
|
@ -152,16 +152,7 @@ func (h *Headscale) scheduledDERPMapUpdateWorker(cancelChan <-chan struct{}) {
|
||||||
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
|
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
|
||||||
}
|
}
|
||||||
|
|
||||||
namespaces, err := h.ListNamespaces()
|
h.setLastStateChangeToNow()
|
||||||
if err != nil {
|
|
||||||
log.Error().
|
|
||||||
Err(err).
|
|
||||||
Msg("Failed to fetch namespaces")
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, namespace := range namespaces {
|
|
||||||
h.setLastStateChangeToNow(namespace.Name)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue