增加异常捕获
This commit is contained in:
parent
9c1ad66dda
commit
519c4d8e80
@ -67,6 +67,8 @@ namespace FastGithub
|
||||
private async Task CheckFastGithubProxyAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
if (OperatingSystem.IsWindows() == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (await this.UseFastGithubProxyAsync() == false)
|
||||
{
|
||||
@ -74,6 +76,11 @@ namespace FastGithub
|
||||
this.logger.LogWarning($"请设置系统自动代理为http://{IPAddress.Loopback}:{httpProxyPort},或手动代理http/https为{IPAddress.Loopback}:{httpProxyPort}");
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
this.logger.LogWarning("尝试获取代理信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user