consul ttl fix
This commit is contained in:
parent
3b6acdc195
commit
32a89d9747
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user