Skip to content

Commit

Permalink
#Issue87 : Adding a additional check for error "cannot assign request…
Browse files Browse the repository at this point in the history
…ed address" to retry again
  • Loading branch information
Satyendra Singh committed Jun 29, 2020
1 parent 806c84d commit 63594c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (nc *NATSCollector) initMetricsFromServers(namespace string) {
Tracef("Initializing metrics collection from: %s", v.URL)
if err := getMetricURL(nc.httpClient, v.URL, &response); err != nil {
// if a server is not running, silently ignore it.
if strings.Contains(err.Error(), "connection refused") {
if strings.Contains(err.Error(), "connection refused") || strings.Contains(err.Error(), "cannot assign requested address") {
Debugf("Unable to connect to the NATS server: %v", err)
} else {
// TODO: Do not retry for other errors?
Expand Down

0 comments on commit 63594c5

Please sign in to comment.