1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

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?