mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Co-authored-by: Diego Heras <ngosang@hotmail.es>
This commit is contained in:
@@ -54,12 +54,9 @@ namespace Jackett.Common.Utils.Clients
|
|||||||
public static void InitProxy(ServerConfig serverConfig)
|
public static void InitProxy(ServerConfig serverConfig)
|
||||||
{
|
{
|
||||||
// dispose old SocksWebProxy
|
// dispose old SocksWebProxy
|
||||||
if (webProxy != null && webProxy is SocksWebProxy)
|
if (webProxy is SocksWebProxy proxy)
|
||||||
{
|
proxy.Dispose();
|
||||||
((SocksWebProxy)webProxy).Dispose();
|
webProxy = null;
|
||||||
webProxy = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
webProxyUrl = serverConfig.GetProxyUrl();
|
webProxyUrl = serverConfig.GetProxyUrl();
|
||||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||||
{
|
{
|
||||||
|
@@ -61,12 +61,9 @@ namespace Jackett.Common.Utils.Clients
|
|||||||
public static void InitProxy(ServerConfig serverConfig)
|
public static void InitProxy(ServerConfig serverConfig)
|
||||||
{
|
{
|
||||||
// dispose old SocksWebProxy
|
// dispose old SocksWebProxy
|
||||||
if (webProxy != null && webProxy is SocksWebProxy)
|
if (webProxy is SocksWebProxy proxy)
|
||||||
{
|
proxy.Dispose();
|
||||||
((SocksWebProxy)webProxy).Dispose();
|
webProxy = null;
|
||||||
webProxy = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
webProxyUrl = serverConfig.GetProxyUrl();
|
webProxyUrl = serverConfig.GetProxyUrl();
|
||||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||||
{
|
{
|
||||||
|
@@ -57,12 +57,9 @@ namespace Jackett.Common.Utils.Clients
|
|||||||
public static void InitProxy(ServerConfig serverConfig)
|
public static void InitProxy(ServerConfig serverConfig)
|
||||||
{
|
{
|
||||||
// dispose old SocksWebProxy
|
// dispose old SocksWebProxy
|
||||||
if (webProxy != null && webProxy is SocksWebProxy)
|
if (webProxy is SocksWebProxy proxy)
|
||||||
{
|
proxy.Dispose();
|
||||||
((SocksWebProxy)webProxy).Dispose();
|
webProxy = null;
|
||||||
webProxy = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
webProxyUrl = serverConfig.GetProxyUrl();
|
webProxyUrl = serverConfig.GetProxyUrl();
|
||||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||||
{
|
{
|
||||||
|
@@ -53,12 +53,9 @@ namespace Jackett.Common.Utils.Clients
|
|||||||
public static void InitProxy(ServerConfig serverConfig)
|
public static void InitProxy(ServerConfig serverConfig)
|
||||||
{
|
{
|
||||||
// dispose old SocksWebProxy
|
// dispose old SocksWebProxy
|
||||||
if (webProxy != null && webProxy is SocksWebProxy)
|
if (webProxy is SocksWebProxy proxy)
|
||||||
{
|
proxy.Dispose();
|
||||||
((SocksWebProxy)webProxy).Dispose();
|
webProxy = null;
|
||||||
webProxy = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
webProxyUrl = serverConfig.GetProxyUrl();
|
webProxyUrl = serverConfig.GetProxyUrl();
|
||||||
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
if (!string.IsNullOrWhiteSpace(webProxyUrl))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user