remove unnecessary checks on slices
This commit is contained in:
parent
09863b540d
commit
c52e3aafe6
4 changed files with 24 additions and 31 deletions
|
@ -358,18 +358,18 @@ func (h *Headscale) handleAuthKeyCommon(
|
|||
if len(aclTags) > 0 {
|
||||
// This conditional preserves the existing behaviour, although SaaS would reset the tags on auth-key login
|
||||
err = h.SetTags(machine, aclTags)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
log.Error().
|
||||
Caller().
|
||||
Bool("noise", machineKey.IsZero()).
|
||||
Str("machine", machine.Hostname).
|
||||
Strs("aclTags", aclTags).
|
||||
Err(err).
|
||||
Msg("Failed to set tags after refreshing machine")
|
||||
if err != nil {
|
||||
log.Error().
|
||||
Caller().
|
||||
Bool("noise", machineKey.IsZero()).
|
||||
Str("machine", machine.Hostname).
|
||||
Strs("aclTags", aclTags).
|
||||
Err(err).
|
||||
Msg("Failed to set tags after refreshing machine")
|
||||
|
||||
return
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
now := time.Now().UTC()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue