Simplify check

Signed-off-by: Alexandre Beslic <abronan@docker.com>
This commit is contained in:
Alexandre Beslic 2015-05-26 12:32:00 -07:00
parent 96241c6b79
commit 814932ccb7
2 changed files with 2 additions and 10 deletions

View File

@ -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.

View File

@ -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
}
}