mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
fix: Set timeout (#435)
This commit is contained in:
parent
9e61be15e6
commit
ff9fd9b377
@ -53,7 +53,7 @@ getCountry () {
|
|||||||
local url=$1
|
local url=$1
|
||||||
local query=$2
|
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
|
(( rc != 0 )) && return 0
|
||||||
|
|
||||||
{ result=$(echo "$json" | jq -r "$query" 2> /dev/null); rc=$?; } || :
|
{ result=$(echo "$json" | jq -r "$query" 2> /dev/null); rc=$?; } || :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user