mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01:00 
			
		
		
		
	Simplify register function if
This commit is contained in:
		
							parent
							
								
									74044f62f4
								
							
						
					
					
						commit
						5cbd4513a4
					
				| @ -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 New Issue
	
	Block a user