mirror of
https://github.com/AuxXxilium/arv-v-dsm.git
synced 2024-11-23 23:10:58 +07:00
fix: Set timeout (#435)
This commit is contained in:
parent
9e61be15e6
commit
ff9fd9b377
@ -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=$?; } || :
|
||||
|
Loading…
Reference in New Issue
Block a user