mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-07 23:58:49 +00:00
Adjustments to automatically update GEO files
This commit is contained in:
parent
60a75d9a31
commit
8e02394ff4
1 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
||||||
public void RegUpdateTask(Config config, Action<bool, string> update)
|
public void RegUpdateTask(Config config, Action<bool, string> update)
|
||||||
{
|
{
|
||||||
Task.Run(() => UpdateTaskRunSubscription(config, update));
|
Task.Run(() => UpdateTaskRunSubscription(config, update));
|
||||||
//Task.Run(() => UpdateTaskRunGeo(config, update));
|
Task.Run(() => UpdateTaskRunGeo(config, update));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task UpdateTaskRunSubscription(Config config, Action<bool, string> update)
|
private async Task UpdateTaskRunSubscription(Config config, Action<bool, string> update)
|
||||||
|
@ -50,12 +50,14 @@
|
||||||
{
|
{
|
||||||
var autoUpdateGeoTime = DateTime.Now;
|
var autoUpdateGeoTime = DateTime.Now;
|
||||||
|
|
||||||
await Task.Delay(1000 * 120);
|
//await Task.Delay(1000 * 120);
|
||||||
Logging.SaveLog("UpdateTaskRunGeo");
|
Logging.SaveLog("UpdateTaskRunGeo");
|
||||||
|
|
||||||
var updateHandle = new UpdateHandler();
|
var updateHandle = new UpdateHandler();
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
await Task.Delay(1000 * 3600);
|
||||||
|
|
||||||
var dtNow = DateTime.Now;
|
var dtNow = DateTime.Now;
|
||||||
if (config.guiItem.autoUpdateInterval > 0)
|
if (config.guiItem.autoUpdateInterval > 0)
|
||||||
{
|
{
|
||||||
|
@ -68,8 +70,6 @@
|
||||||
autoUpdateGeoTime = dtNow;
|
autoUpdateGeoTime = dtNow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await Task.Delay(1000 * 3600);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue