bug fixes

pull/3786/head
2dust 2023-04-27 14:17:27 +08:00
parent b8644268b3
commit c8ae834f50
2 changed files with 3 additions and 2 deletions

View File

@ -112,7 +112,8 @@ namespace v2rayN.Base
}; };
//progress.Report("......"); //progress.Report("......");
using var cts = new CancellationTokenSource(); using var cts = new CancellationTokenSource();
using var stream = await downloader.DownloadFileTaskAsync(address: url, cts.Token).WaitAsync(TimeSpan.FromSeconds(timeout), cts.Token); cts.CancelAfter(timeout * 1000);
using var stream = await downloader.DownloadFileTaskAsync(address: url, cts.Token);
downloadOpt = null; downloadOpt = null;
} }

View File

@ -1281,7 +1281,7 @@ namespace v2rayN.Handler
{ {
return -1; return -1;
} }
var customProfile = SqliteHelper.Instance.Table<ProfileItem>().Where(t => t.subid == subid && t.isSub == isSub && t.configType == EConfigType.Custom).ToList(); var customProfile = SqliteHelper.Instance.Table<ProfileItem>().Where(t => t.subid == subid && t.configType == EConfigType.Custom).ToList();
if (isSub) if (isSub)
{ {
SqliteHelper.Instance.Execute($"delete from ProfileItem where isSub = 1 and subid = '{subid}'"); SqliteHelper.Instance.Execute($"delete from ProfileItem where isSub = 1 and subid = '{subid}'");