Adjust App Exit function

https://github.com/2dust/v2rayN/issues/6634
pull/6651/head
2dust 2025-02-05 17:31:13 +08:00
parent 7e6482fdff
commit d471336994
1 changed files with 3 additions and 2 deletions

View File

@ -287,14 +287,15 @@ namespace ServiceLib.ViewModels
try
{
Logging.SaveLog("MyAppExitAsync Begin");
await SysProxyHandler.UpdateSysProxy(_config, true);
MessageBus.Current.SendMessage("", EMsgCommand.AppExit.ToString());
await ConfigHandler.SaveConfig(_config);
await SysProxyHandler.UpdateSysProxy(_config, true);
await ProfileExHandler.Instance.SaveTo();
await StatisticsHandler.Instance.SaveTo();
StatisticsHandler.Instance.Close();
await CoreHandler.Instance.CoreStop();
StatisticsHandler.Instance.Close();
Logging.SaveLog("MyAppExitAsync End");
}