Skip to content

Commit

Permalink
setLastStateChangeToNow was always receiving nil
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfont committed Sep 4, 2022
1 parent f2fda4f commit 0d074b1
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,19 +860,17 @@ func (h *Headscale) getTLSSettings() (*tls.Config, error) {
}
}

func (h *Headscale) setLastStateChangeToNow(namespaces ...string) {
func (h *Headscale) setLastStateChangeToNow() {
var err error

now := time.Now().UTC()

if len(namespaces) == 0 {
namespaces, err = h.ListNamespacesStr()
if err != nil {
log.Error().
Caller().
Err(err).
Msg("failed to fetch all namespaces, failing to update last changed state.")
}
namespaces, err := h.ListNamespacesStr()
if err != nil {
log.Error().
Caller().
Err(err).
Msg("failed to fetch all namespaces, failing to update last changed state.")
}

for _, namespace := range namespaces {
Expand Down

0 comments on commit 0d074b1

Please sign in to comment.