Browse Source

收到未注册node的心跳,master重新注册node

dev
yfh 4 weeks ago
parent
commit
ec2af38ec5
  1. 9
      master/app/et_master.go

9
master/app/et_master.go

@ -223,7 +223,14 @@ func (the *EtMaster) NodeHeart(nodeArgs *common_models.NodeArgs, reply *bool) er
if !the.clientIsValid(nodeArgs.Addr) {
log.Printf("收到-未注册的node[%v] 心跳", nodeArgs)
*reply = false
return errors.New("未注册的node")
err := the.NodeRegister(nodeArgs, reply)
if err != nil {
return errors.New("未注册的node")
} else {
*reply = true
log.Printf("收到未注册的node[%v]心跳,master已将node重新注册。", nodeArgs)
return nil
}
}
log.Printf("收到-node[%v] 心跳", nodeArgs)

Loading…
Cancel
Save