mirror of
https://github.com/Jackett/Jackett
synced 2025-02-25 07:32:38 +00:00
Co-authored-by: Diego Heras <ngosang@hotmail.es>
This commit is contained in:
parent
594959c858
commit
5b6c9fee49
4 changed files with 12 additions and 24 deletions
|
@ -54,12 +54,9 @@ namespace Jackett.Common.Utils.Clients
|
|||
public static void InitProxy(ServerConfig serverConfig)
|
||||
{
|
||||
// dispose old SocksWebProxy
|
||||
if (webProxy != null && webProxy is SocksWebProxy)
|
||||
{
|
||||
((SocksWebProxy)webProxy).Dispose();
|
||||
webProxy = null;
|
||||
}
|
||||
|
||||
if (webProxy is SocksWebProxy proxy)
|
||||
proxy.Dispose();
|
||||
webProxy = null;
|
||||
webProxyUrl = serverConfig.GetProxyUrl();
|
||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||
{
|
||||
|
|
|
@ -61,12 +61,9 @@ namespace Jackett.Common.Utils.Clients
|
|||
public static void InitProxy(ServerConfig serverConfig)
|
||||
{
|
||||
// dispose old SocksWebProxy
|
||||
if (webProxy != null && webProxy is SocksWebProxy)
|
||||
{
|
||||
((SocksWebProxy)webProxy).Dispose();
|
||||
webProxy = null;
|
||||
}
|
||||
|
||||
if (webProxy is SocksWebProxy proxy)
|
||||
proxy.Dispose();
|
||||
webProxy = null;
|
||||
webProxyUrl = serverConfig.GetProxyUrl();
|
||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||
{
|
||||
|
|
|
@ -57,12 +57,9 @@ namespace Jackett.Common.Utils.Clients
|
|||
public static void InitProxy(ServerConfig serverConfig)
|
||||
{
|
||||
// dispose old SocksWebProxy
|
||||
if (webProxy != null && webProxy is SocksWebProxy)
|
||||
{
|
||||
((SocksWebProxy)webProxy).Dispose();
|
||||
webProxy = null;
|
||||
}
|
||||
|
||||
if (webProxy is SocksWebProxy proxy)
|
||||
proxy.Dispose();
|
||||
webProxy = null;
|
||||
webProxyUrl = serverConfig.GetProxyUrl();
|
||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||
{
|
||||
|
|
|
@ -53,12 +53,9 @@ namespace Jackett.Common.Utils.Clients
|
|||
public static void InitProxy(ServerConfig serverConfig)
|
||||
{
|
||||
// dispose old SocksWebProxy
|
||||
if (webProxy != null && webProxy is SocksWebProxy)
|
||||
{
|
||||
((SocksWebProxy)webProxy).Dispose();
|
||||
webProxy = null;
|
||||
}
|
||||
|
||||
if (webProxy is SocksWebProxy proxy)
|
||||
proxy.Dispose();
|
||||
webProxy = null;
|
||||
webProxyUrl = serverConfig.GetProxyUrl();
|
||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue