Added timeouts on curl calls

This commit is contained in:
kexkey
2019-05-21 14:47:54 -04:00
committed by kexkey
parent 73d7cdf8b2
commit ae12e1747d
3 changed files with 8 additions and 8 deletions

View File

@@ -58,8 +58,8 @@ send_to_bitcoin_node()
local config=${2}
local data=${3}
trace "[send_to_bitcoin_node] curl -s --config ${config} -H \"Content-Type: application/json\" -d \"${data}\" ${node_url}"
result=$(curl -s --config ${config} -H "Content-Type: application/json" -d "${data}" ${node_url})
trace "[send_to_bitcoin_node] curl -m 20 -s --config ${config} -H \"Content-Type: application/json\" -d \"${data}\" ${node_url}"
result=$(curl -m 20 -s --config ${config} -H "Content-Type: application/json" -d "${data}" ${node_url})
returncode=$?
trace_rc ${returncode}
trace "[send_to_bitcoin_node] result=${result}"