From 1ef4598ca08ff779b336ded99ff2e4a1901c33cc Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Tue, 18 Mar 2025 13:06:51 +0100 Subject: [PATCH] timeout everytwhere --- check-health.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check-health.sh b/check-health.sh index 59473e21..d703d678 100755 --- a/check-health.sh +++ b/check-health.sh @@ -41,8 +41,10 @@ if [ $? -eq 0 ]; then response_file3=$(mktemp) http_status_code=$(curl --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file3" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"latest\", false],\"id\":1}" $ref) - - if [ $? -eq 0 ]; then + + curl_code=$? + + if [ $curl_code -eq 0 ]; then if [[ $http_status_code -eq 200 ]]; then response3=$(cat "$response_file3") latest_block_timestamp3=$(echo "$response3" | jq -r '.result.timestamp')