mirror of https://github.com/docker/docs.git
Simplify check
Signed-off-by: Alexandre Beslic <abronan@docker.com>
This commit is contained in:
parent
96241c6b79
commit
814932ccb7
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue