mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-11-04 01:51:04 +01:00 
			
		
		
		
	Merge pull request #638 from kradalby/update-nodes-derp
Simplify DERP maps update function
This commit is contained in:
		
						commit
						6afd492095
					
				
							
								
								
									
										11
									
								
								derp.go
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								derp.go
									
									
									
									
									
								
							@ -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()
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user