BlockListZoneManager: updated UpdateBlockListsAsync() to perform http retries.

This commit is contained in:
Shreyas Zare
2023-03-11 15:13:21 +05:30
parent 2920c418d7
commit 0ca9232a52

View File

@@ -29,6 +29,7 @@ using TechnitiumLibrary.Net;
using TechnitiumLibrary.Net.Dns;
using TechnitiumLibrary.Net.Dns.EDnsOptions;
using TechnitiumLibrary.Net.Dns.ResourceRecords;
using TechnitiumLibrary.Net.Http.Client;
namespace DnsServerCore.Dns.ZoneManagers
{
@@ -392,7 +393,7 @@ namespace DnsServerCore.Dns.ZoneManagers
handler.UseProxy = _dnsServer.Proxy is not null;
handler.AutomaticDecompression = DecompressionMethods.All;
using (HttpClient http = new HttpClient(handler))
using (HttpClient http = new HttpClient(new HttpClientRetryHandler(handler)))
{
if (File.Exists(listFilePath))
http.DefaultRequestHeaders.IfModifiedSince = File.GetLastWriteTimeUtc(listFilePath);