diff --git a/consul/discovery.go b/consul/discovery.go index 80815cd..53115af 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -81,9 +81,8 @@ func (s *Service) Register() error { }() go func() { // TTL - // interval := s.TTL - time.Second*3 - // ticker := time.NewTicker(interval /*s.TTL*/) - ticker := time.NewTicker(s.TTL) + interval := s.TTL - time.Second*3 + ticker := time.NewTicker(interval) for range ticker.C { fmt.Println("HC call: ", time.Now().String()) _, err := s.healthCheck()