avoid nil

fix https://github.com/chrislusf/seaweedfs/issues/452
This commit is contained in:
Chris Lu 2017-02-11 10:21:24 -08:00
parent 654173e7c7
commit 98d66a569b

View File

@ -59,8 +59,8 @@ func (ms MasterServer) SendHeartbeat(stream pb.Seaweed_SendHeartbeatServer) erro
}
} else {
glog.V(0).Infof("lost volume server %s:%d", dn.Ip, dn.Port)
if dn != nil {
glog.V(0).Infof("lost volume server %s:%d", dn.Ip, dn.Port)
t.UnRegisterDataNode(dn)
}
return err