mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Fix block-waiting for leader when there are no volumes
This commit is contained in:
parent
2b3cef7780
commit
f47f8be912
|
@ -63,6 +63,11 @@ func (mc *MasterClient) tryAllMasters() {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if mc.currentMaster == "" {
|
||||||
|
glog.V(0).Infof("Connected to %v", master)
|
||||||
|
mc.currentMaster = master
|
||||||
|
}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
if volumeLocation, err := stream.Recv(); err != nil {
|
if volumeLocation, err := stream.Recv(); err != nil {
|
||||||
glog.V(0).Infof("failed to receive from %s: %v", master, err)
|
glog.V(0).Infof("failed to receive from %s: %v", master, err)
|
||||||
|
@ -78,12 +83,6 @@ func (mc *MasterClient) tryAllMasters() {
|
||||||
for _, deletedVid := range volumeLocation.DeletedVids {
|
for _, deletedVid := range volumeLocation.DeletedVids {
|
||||||
mc.deleteLocation(deletedVid, loc)
|
mc.deleteLocation(deletedVid, loc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if mc.currentMaster == "" {
|
|
||||||
glog.V(0).Infof("Connected to %v", master)
|
|
||||||
mc.currentMaster = master
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue