diff --git a/notifier_docker/script/web.sh b/notifier_docker/script/web.sh index 00277d1..987ae7d 100644 --- a/notifier_docker/script/web.sh +++ b/notifier_docker/script/web.sh @@ -47,12 +47,12 @@ curl_it() { local rnd=$(dd if=/dev/urandom bs=5 count=1 | xxd -pc 5) if [ -n "${data}" ]; then - trace "[curl_it] curl -o webresponse-${rnd} -w \"%{http_code}\" -H \"Content-Type: application/json\" -H \"X-Forwarded-Proto: https\" -d \"${data}\" ${url}" - rc=$(curl -o webresponse-${rnd} -w "%{http_code}" -H "Content-Type: application/json" -H "X-Forwarded-Proto: https" -d "${data}" ${url}) + trace "[curl_it] curl -o webresponse-${rnd} -m 20 -w \"%{http_code}\" -H \"Content-Type: application/json\" -H \"X-Forwarded-Proto: https\" -d \"${data}\" ${url}" + rc=$(curl -o webresponse-${rnd} -m 20 -w "%{http_code}" -H "Content-Type: application/json" -H "X-Forwarded-Proto: https" -d "${data}" ${url}) returncode=$? else - trace "[curl_it] curl -o webresponse-$$ -w \"%{http_code}\" ${url}" - rc=$(curl -o webresponse-${rnd} -w "%{http_code}" ${url}) + trace "[curl_it] curl -o webresponse-$$ -m 20 -w \"%{http_code}\" ${url}" + rc=$(curl -o webresponse-${rnd} -m 20 -w "%{http_code}" ${url}) returncode=$? fi trace "[curl_it] HTTP return code=${rc}" diff --git a/proxy_docker/app/script/notify.sh b/proxy_docker/app/script/notify.sh index 4715aee..5525151 100644 --- a/proxy_docker/app/script/notify.sh +++ b/proxy_docker/app/script/notify.sh @@ -15,8 +15,8 @@ notify_web() { local http_code # We use the pid as the response-topic, so there's no conflict in responses. - trace "[notify_web] mosquitto_rr -h broker -W 5 -t notifier -e \"response/$$\" -m \"{\"response-topic\":\"response/$$\",\"cmd\":\"web\",\"url\":\"${url}\",\"body\":\"${body}\"}\"" - response=$(mosquitto_rr -h broker -W 5 -t notifier -e "response/$$" -m "{\"response-topic\":\"response/$$\",\"cmd\":\"web\",\"url\":\"${url}\",\"body\":\"${body}\"}") + trace "[notify_web] mosquitto_rr -h broker -W 21 -t notifier -e \"response/$$\" -m \"{\"response-topic\":\"response/$$\",\"cmd\":\"web\",\"url\":\"${url}\",\"body\":\"${body}\"}\"" + response=$(mosquitto_rr -h broker -W 21 -t notifier -e "response/$$" -m "{\"response-topic\":\"response/$$\",\"cmd\":\"web\",\"url\":\"${url}\",\"body\":\"${body}\"}") returncode=$? trace_rc ${returncode} diff --git a/proxy_docker/app/script/sendtobitcoinnode.sh b/proxy_docker/app/script/sendtobitcoinnode.sh index f1bd46c..b82a641 100644 --- a/proxy_docker/app/script/sendtobitcoinnode.sh +++ b/proxy_docker/app/script/sendtobitcoinnode.sh @@ -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}"