From 8e5d99282493dae17369505d2e2f788c45abf2f3 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 27 May 2024 19:18:44 +0300 Subject: Added hardcoded timeout to curl calls, again --- bin/ak-stellar-get-participants | 13 +++++++++---- 1 file 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)")" -- cgit v1.2.3