From c14d10c1bc0295a3e6861b44bc891e4c2af39c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Vielmo=20Schmaedeck?= Date: Wed, 27 Mar 2019 00:30:34 -0300 Subject: [PATCH] Fix for #149 Fixes an error where a WebException would be "randomly" thrown when downloading an image --- Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs b/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs index 8ebdf009e..2f8b0f5e6 100644 --- a/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs +++ b/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs @@ -48,6 +48,11 @@ internal sealed class ImageDownloader : IDisposable /// private readonly Dictionary> _imageDownloadCallbacks = new Dictionary>(); + public ImageDownloader() + { + ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; + } + /// /// Makes a request to download the image from the server and raises the when it's down.
///