diff --git a/consul/discovery.go b/consul/discovery.go index db5029c..5b33196 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -119,7 +119,7 @@ func (s *Service) healthCheck() (bool, error) { if err != nil { return false } - req.Header.Set("User-Agent", "Health Check") + req.Header.Set("User-Agent", "service/internal") resp, err := client.Do(req) if err != nil { @@ -132,6 +132,7 @@ func (s *Service) healthCheck() (bool, error) { if alive { if err := s.agent.PassTTL("service:"+s.GetID(), "OK"); err != nil { + fmt.Printf("Failed to pass TTL: %v", err) return false, err } return true, nil