diff --git a/R/get_radar_imagery.R b/R/get_radar_imagery.R index 685715bf..167329d0 100644 --- a/R/get_radar_imagery.R +++ b/R/get_radar_imagery.R @@ -49,8 +49,9 @@ get_available_radar <- function(radar_id = "all") { list_files <- curl::new_handle() curl::handle_setopt( handle = list_files, - TCP_KEEPALIVE = 200000, - CONNECTTIMEOUT = 90, + TCP_KEEPALIVE = 200000L, + CONNECTTIMEOUT = 480L, + TIMEOUT = 480L, ftp_use_epsv = TRUE, dirlistonly = TRUE ) diff --git a/R/get_satellite_imagery.R b/R/get_satellite_imagery.R index 292fb9f9..f46fb4b9 100644 --- a/R/get_satellite_imagery.R +++ b/R/get_satellite_imagery.R @@ -264,14 +264,10 @@ get_satellite_imagery <- get_satellite <- #' @noRd #' @autoglobal .ftp_images <- function(product_id, bom_server) { - # define custom useragent and handle for communicating with BOM servers - USERAGENT <- sprintf("{weatherOz} R package (%s)", - utils::packageVersion("weatherOz")) # set a custom user-agent, restore original settings on exit # required for #130 - BOM returns 403 for RStudio op <- options() on.exit(options(op)) - options(HTTPUserAgent = USERAGENT) # BOM's FTP server can timeout too quickly # Also, BOM's http server sometimes sends a http response of 200, "all good", @@ -281,9 +277,8 @@ get_satellite_imagery <- get_satellite <- curl::handle_setopt( handle = list_files, TCP_KEEPALIVE = 60L, - CONNECTTIMEOUT = 60L, - timeout = 480L, - USERAGENT = USERAGENT, + CONNECTTIMEOUT = 480L, + TIMEOUT = 480L, ftp_use_epsv = TRUE, dirlistonly = TRUE ) diff --git a/codemeta.json b/codemeta.json index d87fbed2..c55e6a05 100644 --- a/codemeta.json +++ b/codemeta.json @@ -542,7 +542,7 @@ "applicationCategory": "Tools", "isPartOf": "https://ropensci.org", "keywords": ["dpird", "bom", "meteorological-data", "weather-forecast", "australia", "weather", "weather-data", "meteorology", "western-australia", "australia-bureau-of-meteorology", "western-australia-agriculture", "australia-agriculture", "australia-climate", "australia-weather", "rstats", "climate", "api-client", "data", "weather-api", "rainfall", "r"], - "fileSize": "15374.293KB", + "fileSize": "15374.067KB", "releaseNotes": "https://github.com/ropensci/weatherOz/blob/master/NEWS.md", "readme": "https://github.com/ropensci/weatherOz/blob/main/README.md", "contIntegration": ["https://github.com/ropensci/weatherOz/actions/workflows/R-CMD-check.yaml", "https://github.com/ropensci/weatherOz/actions/workflows/test-coverage.yaml", "https://app.codecov.io/gh/ropensci/weatherOz"],