diff --git a/cluster/cluster.go b/cluster/cluster.go index bcc0bfd..c2daaa7 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -350,6 +350,15 @@ func (cls *Cluster) IsNodeConnected(nodeId int) bool { return pClient != nil && pClient.IsConnected() } +func (cls *Cluster) IsNodeRetire(nodeId int) bool { + cls.locker.RLock() + defer cls.locker.RUnlock() + + _,retire :=cls.getRpcClient(nodeId) + return retire +} + + func (cls *Cluster) triggerRpcEvent(bConnect bool, clientId uint32, nodeId int) { cls.locker.Lock() nodeInfo, ok := cls.mapRpc[nodeId]