This commit is contained in:
Chris Lu 2018-08-24 00:30:03 -07:00
parent ac793a3c5a
commit 5ccf8e8078

View file

@ -43,7 +43,10 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
for {
heartbeat, err := stream.Recv()
if err == nil {
if err != nil {
return err
}
if dn == nil {
t.Sequence.SetMax(heartbeat.MaxFileKey)
if heartbeat.Ip == "" {
@ -90,10 +93,6 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
ms.clientChansLock.RUnlock()
}
} else {
return err
}
// tell the volume servers about the leader
newLeader, err := t.Leader()
if err == nil {