Account for updates in shared namespaces

This commit is contained in:
Kristoffer Dalby 2021-10-06 19:32:15 +00:00
parent c582c8d206
commit ba391bc2ed
2 changed files with 20 additions and 5 deletions

2
app.go
View file

@ -250,8 +250,8 @@ func (h *Headscale) setLastStateChangeToNow(namespace string) {
func (h *Headscale) getLastStateChange(namespace string) time.Time {
if wrapped, ok := h.lastStateChange.Load(namespace); ok {
lastChange, _ := wrapped.(time.Time)
return lastChange
return lastChange
}
now := time.Now().UTC()