Return immediately if no enterprise hosts

This commit is contained in:
Tim Raymond 2016-02-11 14:11:36 -05:00
parent 8c81034051
commit 7394375a2e
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ func NewEnterprise(c Config, hostname string, shutdown chan struct{}) *Service {
}
func (s *Service) Open() {
if len(s.hosts) == 0 {
return
}
cl, err := client.New(s.hosts)
if err != nil {
s.logger.Printf("Unable to contact one or more Enterprise hosts. err: %s", err.Error())