diff --git a/discovery/kv/kv.go b/discovery/kv/kv.go index 0627788833..1424c0716f 100644 --- a/discovery/kv/kv.go +++ b/discovery/kv/kv.go @@ -62,14 +62,7 @@ func (s *Discovery) Initialize(uris string, heartbeat time.Duration, ttl time.Du }, ) - if err != nil { - if err == store.ErrInvalidTTL { - log.Fatal(err) - } - return err - } - - return nil + return err } // Watch the store until either there's a store error or we receive a stop request. diff --git a/pkg/store/consul.go b/pkg/store/consul.go index 3335bdff2a..e055a03e70 100644 --- a/pkg/store/consul.go +++ b/pkg/store/consul.go @@ -56,8 +56,7 @@ func InitializeConsul(endpoints []string, options *Config) (Store, error) { s.setTimeout(options.ConnectionTimeout) } if options.EphemeralTTL != 0 { - err := s.setEphemeralTTL(options.EphemeralTTL) - if err != nil { + if err := s.setEphemeralTTL(options.EphemeralTTL); err != nil { return nil, err } }