Merge pull request #1105 from prometheus/consulnil

Fix nil panic on consul error
This commit is contained in:
Fabian Reinartz 2015-09-22 14:55:31 +02:00
commit cac6eea434
1 changed files with 1 additions and 0 deletions

View File

@ -195,6 +195,7 @@ func (cd *ConsulDiscovery) watchServices(update chan<- *consulService, done <-ch
if err != nil {
log.Errorf("Error refreshing service list: %s", err)
time.Sleep(consulRetryInterval)
continue
}
// If the index equals the previous one, the watch timed out with no update.
if meta.LastIndex == lastIndex {