示例#1
0
        void RestartCoreWorker(Action next)
        {
            var finalConfig = configer.GetFinalConfig();

            if (finalConfig == null)
            {
                StopCoreThen(next);
                return;
            }

            v2rayCore.title = coreStates.GetTitle();
            v2rayCore.RestartCoreThen(
                finalConfig.ToString(),
                () => next?.Invoke(),
                Misc.Utils.GetEnvVarsFromConfig(finalConfig));
        }
示例#2
0
        void RestartCoreWorker(Action next)
        {
            try
            {
                var finalConfig = configer.GetFinalConfig();
                if (finalConfig == null)
                {
                    StopCore();
                    return;
                }

                v2rayCore.title = coreStates.GetTitle();
                v2rayCore.RestartCore(finalConfig.ToString(), Misc.Utils.GetEnvVarsFromConfig(finalConfig));
                bookKeeper?.Run();
            }
            finally
            {
                next?.Invoke();
            }
        }