diff options
author | Daniel Hahler <git@thequod.de> | 2019-12-21 06:39:26 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-12-21 06:39:26 +0100 |
commit | b2443361ca3074c37bdf4112ca8f22efebdcbd23 (patch) | |
tree | 25ec3a0ad95a5433fb5dbf38d733d748be52c802 | |
parent | 416de695f9e71e494e3b6e4187e850e560abf7af (diff) | |
download | rneovim-b2443361ca3074c37bdf4112ca8f22efebdcbd23.tar.gz rneovim-b2443361ca3074c37bdf4112ca8f22efebdcbd23.tar.bz2 rneovim-b2443361ca3074c37bdf4112ca8f22efebdcbd23.zip |
build: DownloadAndExtractFile.cmake: retry status_code=7 #11582
Retry downloads with "Couldn't connect to server" errors.
Ref: https://lgtm.com/projects/g/neovim/neovim/logs/rev/pr-ca2f193a91f02881deb637f18694818bda49a7ed/lang:cpp/stage:Build%20master_026ba804d173c41ab99ee270c93f7975c1d6d713
-rw-r--r-- | third-party/cmake/DownloadAndExtractFile.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/third-party/cmake/DownloadAndExtractFile.cmake b/third-party/cmake/DownloadAndExtractFile.cmake index bb8cf1b674..e008fa8a8a 100644 --- a/third-party/cmake/DownloadAndExtractFile.cmake +++ b/third-party/cmake/DownloadAndExtractFile.cmake @@ -76,7 +76,8 @@ list(GET status 1 status_string) if(NOT status_code EQUAL 0) # Retry on certain errors, e.g. CURLE_COULDNT_RESOLVE_HOST, which is often # seen with libtermkey (www.leonerd.org.uk). - if(status_code EQUAL 6) # "Couldn't resolve host name" + if((status_code EQUAL 6) # "Couldn't resolve host name" + OR (status_code EQUAL 7)) # "Couldn't connect to server" message(STATUS "warning: retrying '${URL}' (${status_string}, status ${status_code})") execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 10) file(DOWNLOAD ${URL} ${file} |