mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
always send the leader info on each heartbeat
This commit is contained in:
parent
3cb0071025
commit
f302c9fda2
|
@ -66,16 +66,14 @@ func (ms MasterServer) SendHeartbeat(stream pb.Seaweed_SendHeartbeatServer) erro
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !t.IsLeader() {
|
// tell the volume servers about the leader
|
||||||
newLeader, err := t.Leader()
|
newLeader, err := t.Leader()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if err := stream.Send(&pb.HeartbeatResponse{
|
if err := stream.Send(&pb.HeartbeatResponse{
|
||||||
Leader: newLeader,
|
Leader: newLeader,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue