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
This commit is contained in:
parent
416de695f9
commit
b2443361ca
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue