|
|
@ -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) |
|
|
|