chenwanli 2019-03-04 12:43:43 +08:00
parent 219b651bc3
commit f233bbe9c0

View file

@ -102,12 +102,13 @@ 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 {
if err := stream.Send(&master_pb.HeartbeatResponse{ return err
Leader: newLeader, }
}); err != nil { if err := stream.Send(&master_pb.HeartbeatResponse{
return err Leader: newLeader,
} }); err != nil {
return err
} }
} }
} }