Set connection timeout for curl

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König 2022-08-30 20:03:38 +02:00
parent d6cfa57ef3
commit 53c0982c8b
No known key found for this signature in database
GPG key ID: 4CDA6F249DD2B485

View file

@ -641,7 +641,7 @@ gravity_DownloadBlocklistFromUrl() {
fi
# shellcheck disable=SC2086
httpCode=$(curl -s -L ${compression} ${cmd_ext} ${heisenbergCompensator} -w "%{http_code}" -A "${agent}" "${url}" -o "${patternBuffer}" 2> /dev/null)
httpCode=$(curl --connect-timeout 10 -s -L ${compression} ${cmd_ext} ${heisenbergCompensator} -w "%{http_code}" -A "${agent}" "${url}" -o "${patternBuffer}" 2> /dev/null)
case $url in
# Did we "download" a local file?