From d13974f2897b6e0d89e3424c01f329c50faeb613 Mon Sep 17 00:00:00 2001 From: Micah Acinapura Date: Tue, 27 Feb 2024 10:31:10 -0500 Subject: [PATCH] Issue/1250 Increase timeout for gdal http and updated url for loading gibs (#3015) * increase timeout for gdal http requests and updated url for loading gibs data * revertingurl change as its no longer redirecting for me * fixed includes, moved setting long time out to only when we load capabilities * removed comment * refix include closes #1250 --- data/globebrowsing_servers.lua | 2 -- modules/globebrowsing/globebrowsingmodule.cpp | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/globebrowsing_servers.lua b/data/globebrowsing_servers.lua index 1c2de7dc53..c3defef508 100644 --- a/data/globebrowsing_servers.lua +++ b/data/globebrowsing_servers.lua @@ -46,5 +46,3 @@ return { } } - --- https://astrowebmaps.wr.usgs.gov/webmapatlas/Layers/maps.html \ No newline at end of file diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 8c4734d395..c1aeefcced 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -83,6 +83,7 @@ #pragma warning (disable : 4251) #endif // _MSC_VER +#include #include #ifdef _MSC_VER @@ -550,10 +551,12 @@ void GlobeBrowsingModule::loadWMSCapabilities(std::string name, std::string glob { auto downloadFunction = [](const std::string& downloadUrl) { LDEBUG("Opening WMS capabilities: " + downloadUrl); + CPLSetConfigOption("GDAL_HTTP_TIMEOUT", "15"); // 3 seconds GDALDatasetH dataset = GDALOpen( downloadUrl.c_str(), GA_ReadOnly ); + CPLSetConfigOption("GDAL_HTTP_TIMEOUT", "3"); // 3 seconds if (!dataset) { LWARNING("Could not open dataset: " + downloadUrl);