mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
This commit is contained in:
parent
219b651bc3
commit
f233bbe9c0
|
@ -102,14 +102,15 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
|
||||||
|
|
||||||
// tell the volume servers about the leader
|
// tell the volume servers about the leader
|
||||||
newLeader, err := t.Leader()
|
newLeader, err := t.Leader()
|
||||||
if err == nil {
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := stream.Send(&master_pb.HeartbeatResponse{
|
if err := stream.Send(&master_pb.HeartbeatResponse{
|
||||||
Leader: newLeader,
|
Leader: newLeader,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// KeepConnected keep a stream gRPC call to the master. Used by clients to know the master is up.
|
// KeepConnected keep a stream gRPC call to the master. Used by clients to know the master is up.
|
||||||
|
|
Loading…
Reference in a new issue