From 6537d79b19a77462cff2c13431722d323fdce333 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Fri, 19 Jul 2024 16:48:08 +0200 Subject: [PATCH] fix in consul discovery --- consul/discovery.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consul/discovery.go b/consul/discovery.go index 2f97e57..56758a1 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -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() } } }()