diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-21 08:11:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-21 08:11:14 +0100 |
commit | e694f209ae6e5e925b7a467c677dca1a7a9cac88 (patch) | |
tree | ac0fd9d927f1d29edc8889fd433db001aac2f2c2 | |
parent | aa8ff21b2a37e6235b7024e5b2804219337a7e74 (diff) | |
parent | 394f04a2b429dfeeefaff97bfb5b59df70a58005 (diff) |
Merge pull request #59351 from taisph/feature/fix-getaddrinfo-failed
Fix getaddrinfo failed with undefined proxy config
-rw-r--r-- | editor/editor_settings.cpp | 4 | ||||
-rw-r--r-- | editor/export_template_manager.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 2d80fe85f8..781c397a01 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -716,6 +716,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Profiler _initial_set("debugger/profiler_frame_history_size", 600); + // HTTP Proxy + _initial_set("network/http_proxy/host", ""); + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "network/http_proxy/port", 8080, "1,65535,1") + /* Extra config */ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Name,Path,Last Edited") 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); |