Compare commits

..

2 Commits

Author SHA1 Message Date
6537d79b19 fix in consul discovery 2024-07-19 16:48:08 +02:00
e55a2f42fe fix in consul discovery 2024-07-19 16:45:42 +02:00

View File

@@ -102,8 +102,8 @@ func (s *Service) Register() error {
return nil
}
func (s *Service) Unregister() error {
s.ttlTicker.Stop()
s.hcTicker.Stop()
// s.ttlTicker.Stop()
// s.hcTicker.Stop()
s.client.Catalog().Deregister(&consul.CatalogDeregistration{
Address: s.Address,
@@ -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()
}
}
}()