aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-05-27 19:18:44 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-05-27 19:18:44 +0300
commit8e5d99282493dae17369505d2e2f788c45abf2f3 (patch)
tree178eed8b00f39ff389182227a0769028fe4d98cc /bin
parent4be8482daed5524db80bd46019b5a4dcc74303ee (diff)
downloadarching-kaos-tools-8e5d99282493dae17369505d2e2f788c45abf2f3.tar.gz
arching-kaos-tools-8e5d99282493dae17369505d2e2f788c45abf2f3.tar.bz2
arching-kaos-tools-8e5d99282493dae17369505d2e2f788c45abf2f3.zip
Added hardcoded timeout to curl calls, again
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ak-stellar-get-participants13
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/ak-stellar-get-participants b/bin/ak-stellar-get-participants
index 932393a..dfaf78d 100755
--- a/bin/ak-stellar-get-participants
+++ b/bin/ak-stellar-get-participants
@@ -61,13 +61,16 @@ get_next_page(){
}
proceed_to_next_page(){
-
nextURL="$(get_next_page)"
- curl "$nextURL" > $tempfile 2>/dev/null
+ curl \
+ --connect-timeout 3 \
+ "$nextURL" > $tempfile 2>/dev/null
}
get_asset_holders(){
- curl https://horizon.stellar.org/accounts\?asset\=ARCHINGKAOS:GB4QVKD6NW3CSNO5TNPARAWNPPXOPSSTKB35XCWB7PUNBIQTK3DVELB2\&limit\=$limit > $tempfile 2>/dev/null
+ curl \
+ --connect-timeout 3 \
+ https://horizon.stellar.org/accounts\?asset\=ARCHINGKAOS:GB4QVKD6NW3CSNO5TNPARAWNPPXOPSSTKB35XCWB7PUNBIQTK3DVELB2\&limit\=$limit > $tempfile 2>/dev/null
}
get_asset_holders
@@ -83,7 +86,9 @@ rm $tempfile $tempaddr
while IFS="" read -r p || [ -n "$p" ]
do
flag=0
- test="$(curl https://horizon.stellar.org/accounts/$p/data/config 2>/dev/null | grep value)"
+ test="$(curl \
+ --connect-timeout 3 \
+ https://horizon.stellar.org/accounts/$p/data/config 2>/dev/null | grep value)"
if [ "$?" == 0 ]
then
addressValuePair="$(printf '%s %s\n' "$p" "$(echo $test | sed -e 's/^.*: "//g; s/"//g' | base64 -d)")"