diff --git a/Aria2Fast/Service/SubscriptionManager.cs b/Aria2Fast/Service/SubscriptionManager.cs index 85d03ac..208225d 100644 --- a/Aria2Fast/Service/SubscriptionManager.cs +++ b/Aria2Fast/Service/SubscriptionManager.cs @@ -299,7 +299,7 @@ public SubscriptionInfoModel GetSubscriptionInfo(string url) var handler = new HttpClientHandler() { Proxy = proxy }; var client = new HttpClient(handler); - // 注意这里的GET请求的地址需要替换为你需要请求的地址 + client.Timeout = TimeSpan.FromSeconds(20); var response = client.GetAsync(url).Result; @@ -309,9 +309,16 @@ public SubscriptionInfoModel GetSubscriptionInfo(string url) } else { - reader = XmlReader.Create(url); + var client = new HttpClient(); + client.Timeout = TimeSpan.FromSeconds(20); + var response = client.GetAsync(url).Result; + reader = XmlReader.Create(response.Content.ReadAsStreamAsync().Result); feed = SyndicationFeed.Load(reader); reader.Close(); + + //reader = XmlReader.Create(url); + //feed = SyndicationFeed.Load(reader); + //reader.Close(); } EasyLogManager.Logger.Info($"获取订阅标题:{feed.Title.Text}");