fix in consul discovery
This commit is contained in:
parent
e55a2f42fe
commit
6537d79b19
@ -102,7 +102,7 @@ func (s *Service) Register() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (s *Service) Unregister() error {
|
func (s *Service) Unregister() error {
|
||||||
s.ttlTicker.Stop()
|
// s.ttlTicker.Stop()
|
||||||
// s.hcTicker.Stop()
|
// s.hcTicker.Stop()
|
||||||
|
|
||||||
s.client.Catalog().Deregister(&consul.CatalogDeregistration{
|
s.client.Catalog().Deregister(&consul.CatalogDeregistration{
|
||||||
@ -128,7 +128,7 @@ func (s *Service) RegisterHealthChecks() {
|
|||||||
for range s.ttlTicker.C {
|
for range s.ttlTicker.C {
|
||||||
if _, err := s.healthCheck(); err != nil {
|
if _, err := s.healthCheck(); err != nil {
|
||||||
fmt.Printf("HealthCheck endpoint not available (%s)#: %v\n", s.GetFullAddr(), err)
|
fmt.Printf("HealthCheck endpoint not available (%s)#: %v\n", s.GetFullAddr(), err)
|
||||||
// s.ttlTicker.Stop()
|
s.ttlTicker.Stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user