Handle failure to dial.
This commit is contained in:
parent
d526a04717
commit
77a8833d70
@ -195,10 +195,12 @@ func main() {
|
|||||||
glog.Errorf("Error dialing %q: %v", host, err)
|
glog.Errorf("Error dialing %q: %v", host, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := updateMetrics(host, c); err != nil {
|
if c != nil {
|
||||||
glog.Errorf("Failed to update metrics: %v", err)
|
if err := updateMetrics(host, c); err != nil {
|
||||||
c.Close()
|
glog.Errorf("Failed to update metrics: %v", err)
|
||||||
c = nil
|
c.Close()
|
||||||
|
c = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
time.Sleep(*refreshInterval)
|
time.Sleep(*refreshInterval)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user