Skip to content

Commit

Permalink
Merge pull request #638 from kradalby/update-nodes-derp
Browse files Browse the repository at this point in the history
Simplify DERP maps update function
  • Loading branch information
juanfont authored Jun 12, 2022
2 parents e0ef601 + a050158 commit 6afd492
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions derp.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,7 @@ func (h *Headscale) scheduledDERPMapUpdateWorker(cancelChan <-chan struct{}) {
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
}

namespaces, err := h.ListNamespaces()
if err != nil {
log.Error().
Err(err).
Msg("Failed to fetch namespaces")
}

for _, namespace := range namespaces {
h.setLastStateChangeToNow(namespace.Name)
}
h.setLastStateChangeToNow()
}
}
}

0 comments on commit 6afd492

Please sign in to comment.