private void DeclareIdle() { if (_state == null || !_state.IsIdle) { Logger.Info($"Cluster idle: {_node}"); _state = new IdleState(_node, this, Logger); if (_registry.CurrentLeader.Equals(_node)) { _registry.DemoteLeaderOf(_node.Id); } } }