From ff9fd9b3779d1722f7cc31be58a0da1ebda03d40 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 6 Dec 2023 07:16:30 +0100 Subject: [PATCH] fix: Set timeout (#435) --- src/reset.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reset.sh b/src/reset.sh index 1cf91cb..2a970cf 100644 --- a/src/reset.sh +++ b/src/reset.sh @@ -53,7 +53,7 @@ getCountry () { local url=$1 local query=$2 - { json=$(curl -H "Accept: application/json" -sfk "$url"); rc=$?; } || : + { json=$(curl -m 5 -H "Accept: application/json" -sfk "$url"); rc=$?; } || : (( rc != 0 )) && return 0 { result=$(echo "$json" | jq -r "$query" 2> /dev/null); rc=$?; } || :