fix in consul discovery

This commit is contained in:
Piotr Biernat 2024-07-19 16:48:08 +02:00
parent e55a2f42fe
commit 6537d79b19

View File

@ -102,7 +102,7 @@ func (s *Service) Register() error {
return nil
}
func (s *Service) Unregister() error {
s.ttlTicker.Stop()
// s.ttlTicker.Stop()
// s.hcTicker.Stop()
s.client.Catalog().Deregister(&consul.CatalogDeregistration{
@ -128,7 +128,7 @@ func (s *Service) RegisterHealthChecks() {
for range s.ttlTicker.C {
if _, err := s.healthCheck(); err != nil {
fmt.Printf("HealthCheck endpoint not available (%s)#: %v\n", s.GetFullAddr(), err)
// s.ttlTicker.Stop()
s.ttlTicker.Stop()
}
}
}()