mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
loop through all masters
This commit is contained in:
parent
4a5e381feb
commit
6e776aaafc
|
@ -130,11 +130,13 @@ func maybeStartMetrics(fs *FilerServer, option *FilerOption) {
|
||||||
var metricsIntervalSec int
|
var metricsIntervalSec int
|
||||||
var readErr error
|
var readErr error
|
||||||
for !isConnected {
|
for !isConnected {
|
||||||
metricsAddress, metricsIntervalSec, readErr = readFilerConfiguration(fs.grpcDialOption, option.Masters[0])
|
for _, master := range option.Masters {
|
||||||
if readErr == nil {
|
metricsAddress, metricsIntervalSec, readErr = readFilerConfiguration(fs.grpcDialOption, master)
|
||||||
isConnected = true
|
if readErr == nil {
|
||||||
} else {
|
isConnected = true
|
||||||
time.Sleep(7 * time.Second)
|
} else {
|
||||||
|
time.Sleep(7 * time.Second)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if metricsAddress == "" && metricsIntervalSec <= 0 {
|
if metricsAddress == "" && metricsIntervalSec <= 0 {
|
||||||
|
|
Loading…
Reference in a new issue