mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	plugin/forward: fix healthchecker crash (#2165)
This commit is contained in:
		
				
					committed by
					
						 Miek Gieben
						Miek Gieben
					
				
			
			
				
	
			
			
			
						parent
						
							cbcc38bcb5
						
					
				
				
					commit
					298b860a97
				
			| @@ -50,6 +50,11 @@ func (p *Proxy) SetExpire(expire time.Duration) { p.transport.SetExpire(expire) | ||||
|  | ||||
| // Healthcheck kicks of a round of health checks for this proxy. | ||||
| func (p *Proxy) Healthcheck() { | ||||
| 	if p.health == nil { | ||||
| 		log.Warning("No healthchecker") | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	p.probe.Do(func() error { | ||||
| 		return p.health.Check(p) | ||||
| 	}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user