summaryrefslogtreecommitdiff
path: root/editor/export_template_manager.cpp
diff options
context:
space:
mode:
authorTais P. Hansen <taishansen@gmail.com>2022-03-20 13:56:11 +0100
committerTais P. Hansen <taishansen@gmail.com>2022-03-20 17:17:11 +0100
commit394f04a2b429dfeeefaff97bfb5b59df70a58005 (patch)
tree7f7b57e34698538479861e7d642d79ee62f08d70 /editor/export_template_manager.cpp
parent5901d9145822bd068078441f4e96377d49018ed9 (diff)
Fix getaddrinfo failed with undefined proxy config
HTTPClientTCP expects proxy host to be empty or port to be -1 to ignore the proxy. When getting the proxy config from the settings file, the values will default to U"null" and 0, respectively, making HTTPClientTCP to attempt to use the values as a proxy, which causes getaddrinfo to fail looking up a "null" hostname. Setting the default config values seems like a good approach to prevent this issue. Fixes #59037
Diffstat (limited to 'editor/export_template_manager.cpp')
-rw-r--r--editor/export_template_manager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index df3e73267e..7320f957c9 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -147,8 +147,8 @@ void ExportTemplateManager::_download_template(const String &p_url, bool p_skip_
download_templates->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_templates.tpz"));
download_templates->set_use_threads(true);
- const String proxy_host = EDITOR_DEF("network/http_proxy/host", "");
- const int proxy_port = EDITOR_DEF("network/http_proxy/port", -1);
+ const String proxy_host = EDITOR_GET("network/http_proxy/host");
+ const int proxy_port = EDITOR_GET("network/http_proxy/port");
download_templates->set_http_proxy(proxy_host, proxy_port);
download_templates->set_https_proxy(proxy_host, proxy_port);