timeout everytwhere

This commit is contained in:
Sebastian
2025-03-18 12:58:58 +01:00
parent 70036ec47b
commit d887840138

View File

@@ -7,7 +7,7 @@ timeout=5 # seconds
response_file=$(mktemp)
http_status_code=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL)
http_status_code=$(curl --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL)
if [ $? -eq 0 ]; then
if [[ $http_status_code -eq 200 ]]; then