avoid infinite loop WaitUntilConnected() (#3431)

https://github.com/seaweedfs/seaweedfs/issues/3421
This commit is contained in:
Konstantin Lebedev authored and GitHub committed 2022-08-11 15:03:26 -07:00
1 parent 53b601616c
commit 4d4cd0948d
2 files changed
+5 -7

No files matched your search

+1 -3
View File
@@ -276,11 +276,9 @@ func (ms *MasterServer) startAdminScripts() {
go commandEnv.MasterClient.KeepConnectedToMaster()
go func() {
commandEnv.MasterClient.WaitUntilConnected()
for {
time.Sleep(time.Duration(sleepMinutes) * time.Minute)
if ms.Topo.IsLeader() {
if ms.Topo.IsLeader() && ms.MasterClient.GetMaster() != "" {
shellOptions.FilerAddress = ms.GetOneFiler(cluster.FilerGroupName(*shellOptions.FilerGroup))
if shellOptions.FilerAddress == "" {
continue