mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 17:03:06 +00:00
Simplify register function if
This commit is contained in:
parent
74044f62f4
commit
5cbd4513a4
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ type (
|
|||
)
|
||||
|
||||
// For the time being this method is rather naive.
|
||||
func (machine Machine) isAlreadyRegistered() bool {
|
||||
func (machine Machine) isRegistered() bool {
|
||||
return machine.Registered
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ func (h *Headscale) RegisterMachine(
|
|||
Str("machine", machine.Name).
|
||||
Msg("Attempting to register machine")
|
||||
|
||||
if machine.isAlreadyRegistered() {
|
||||
if machine.isRegistered() {
|
||||
err := errMachineAlreadyRegistered
|
||||
log.Error().
|
||||
Caller().
|
||||
|
|
Loading…
Reference in a new issue