bug fixes

pull/3677/head
2dust 2023-04-11 20:18:49 +08:00
parent a1c743e59c
commit 3fa22fdc55
4 changed files with 7 additions and 7 deletions

View File

@ -84,7 +84,7 @@ namespace v2rayN
} }
} }
private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) private void TaskScheduler_UnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs e)
{ {
Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception); Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
} }

View File

@ -828,11 +828,11 @@ namespace v2rayN.Handler
/// <param name="fileName"></param> /// <param name="fileName"></param>
/// <param name="msg"></param> /// <param name="msg"></param>
/// <returns></returns> /// <returns></returns>
private static int GenerateClientCustomConfig(ProfileItem node, string fileName, out string msg) private static int GenerateClientCustomConfig(ProfileItem node, string? fileName, out string msg)
{ {
try try
{ {
if (node == null) if (node == null || fileName is null)
{ {
msg = ResUI.CheckServerSettings; msg = ResUI.CheckServerSettings;
return -1; return -1;

View File

@ -243,7 +243,7 @@ namespace v2rayN.Handler
WebProxy webProxy = new(Global.Loopback, it.port); WebProxy webProxy = new(Global.Loopback, it.port);
await downloadHandle.DownloadDataAsync(url, webProxy, timeout, async (bool success, string msg) => await downloadHandle.DownloadDataAsync(url, webProxy, timeout, (bool success, string msg) =>
{ {
decimal.TryParse(msg, out decimal dec); decimal.TryParse(msg, out decimal dec);
if (dec > 0) if (dec > 0)
@ -294,7 +294,7 @@ namespace v2rayN.Handler
if (item is null) continue; if (item is null) continue;
WebProxy webProxy = new(Global.Loopback, it.port); WebProxy webProxy = new(Global.Loopback, it.port);
_ = downloadHandle.DownloadDataAsync(url, webProxy, timeout, async (bool success, string msg) => _ = downloadHandle.DownloadDataAsync(url, webProxy, timeout, (bool success, string msg) =>
{ {
decimal.TryParse(msg, out decimal dec); decimal.TryParse(msg, out decimal dec);
if (dec > 0) if (dec > 0)

View File

@ -917,8 +917,8 @@ namespace v2rayN.ViewModels
public void AddServerViaClipboard() public void AddServerViaClipboard()
{ {
string clipboardData = Utils.GetClipboardData(); var clipboardData = Utils.GetClipboardData();
int ret = ConfigHandler.AddBatchServers(ref _config, clipboardData, _subId, false); int ret = ConfigHandler.AddBatchServers(ref _config, clipboardData!, _subId, false);
if (ret > 0) if (ret > 0)
{ {
InitSubscriptionView(); InitSubscriptionView();