From 3724d899490f93dd74c3cd80814ee1d1abde9c3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Fri, 31 Jan 2020 11:14:50 -0500
Subject: [PATCH] jamiaccount: don't load proxy list if proxy is disabled

Change-Id: Id60ad54c256b6597bda16880169d1d8c4d4d0690
---
 src/jamidht/jamiaccount.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp
index 48d1c42051..b8efc5a97e 100644
--- a/src/jamidht/jamiaccount.cpp
+++ b/src/jamidht/jamiaccount.cpp
@@ -2228,7 +2228,7 @@ JamiAccount::loadCachedUrl(const std::string& url,
 void
 JamiAccount::loadCachedProxyServer(std::function<void(const std::string& proxy)> cb)
 {
-    if (proxyServerCached_.empty()) {
+    if (proxyEnabled_ and proxyServerCached_.empty()) {
         JAMI_DBG("[Account %s] loading DHT proxy URL", getAccountID().c_str());
         if (proxyListUrl_.empty()) {
             cb(getDhtProxyServer(proxyServer_));
-- 
GitLab