Skip to content

Commit

Permalink
Fix for #149
Browse files Browse the repository at this point in the history
Fixes an error where a WebException would be "randomly" thrown when downloading an image
  • Loading branch information
schdck committed Mar 27, 2019
1 parent e0a2d17 commit c14d10c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs
Expand Up @@ -48,6 +48,11 @@ internal sealed class ImageDownloader : IDisposable
/// </summary>
private readonly Dictionary<string, List<DownloadFileAsyncCallback>> _imageDownloadCallbacks = new Dictionary<string, List<DownloadFileAsyncCallback>>();

public ImageDownloader()
{
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
}

/// <summary>
/// Makes a request to download the image from the server and raises the <see cref="cachedFileCallback"/> when it's down.<br/>
/// </summary>
Expand Down

0 comments on commit c14d10c

Please sign in to comment.