From cccbacad13d9565dbd63fe743696974c7824f4e1 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 18 Mar 2023 13:32:07 +0530 Subject: [PATCH] AdvancedBlocking: using HttpClientNetworkHandler that does retries as well as resolves via given dns client. --- Apps/AdvancedBlockingApp/App.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Apps/AdvancedBlockingApp/App.cs b/Apps/AdvancedBlockingApp/App.cs index 4ace1247..f49ef603 100644 --- a/Apps/AdvancedBlockingApp/App.cs +++ b/Apps/AdvancedBlockingApp/App.cs @@ -931,7 +931,7 @@ namespace AdvancedBlocking handler.UseProxy = _dnsServer.Proxy is not null; handler.AutomaticDecompression = DecompressionMethods.All; - using (HttpClient http = new HttpClient(new HttpClientRetryHandler(handler))) + using (HttpClient http = new HttpClient(new HttpClientNetworkHandler(handler, _dnsServer.PreferIPv6 ? HttpClientNetworkType.PreferIPv6 : HttpClientNetworkType.Default, _dnsServer))) { if (File.Exists(_listFilePath)) http.DefaultRequestHeaders.IfModifiedSince = File.GetLastWriteTimeUtc(_listFilePath);