diff options
Diffstat (limited to 'MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index ce1e9fd7f..5c70179a8 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -128,11 +128,6 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager private void AddIpv4Option(HttpWebRequest request, HttpRequestOptions options) { - if (!options.PreferIpv4) - { - return; - } - request.ServicePoint.BindIPEndPointDelegate = (servicePount, remoteEndPoint, retryCount) => { if (remoteEndPoint.AddressFamily == AddressFamily.InterNetwork) @@ -150,7 +145,10 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager if (httpWebRequest != null) { - AddIpv4Option(httpWebRequest, options); + if (options.PreferIpv4) + { + AddIpv4Option(httpWebRequest, options); + } AddRequestHeaders(httpWebRequest, options); |
