aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_zblock
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_ak_zblock')
-rwxr-xr-xlib/_ak_zblock14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/_ak_zblock b/lib/_ak_zblock
index e1e6914..cb6af36 100755
--- a/lib/_ak_zblock
+++ b/lib/_ak_zblock
@@ -601,7 +601,12 @@ _ak_zblock_pack(){
_ak_zblock_announce(){
if [ ! -z "$1" ] && [ -n "$1" ]
then
- curl http://127.0.0.1:8610/v0/announce/zblock --header 'Content-Type: application/json' --data-raw '{"zblock":"'$1'"}' 2>/dev/null | jq -M -c > /dev/null
+ curl \
+ --connect-timeout 3 \
+ --header 'Content-Type: application/json' \
+ --data-raw '{"zblock":"'$1'"}' \
+ "http://127.0.0.1:8610/v0/announce/zblock" \
+ 2>/dev/null | jq -M -c > /dev/null
if [ $? -ne 0 ]
then
logit "ERROR" "zblock $zblock announcement failed"
@@ -609,7 +614,12 @@ _ak_zblock_announce(){
logit "INFO" "zblock $zblock announced"
fi
else
- curl http://127.0.0.1:8610/v0/announce/zblock --header 'Content-Type: application/json' --data-raw '{"zblock":"'$(ak-get-zlatest)'"}' 2>/dev/null | jq -M -c > /dev/null
+ curl \
+ --connect-timeout 3 \
+ --header 'Content-Type: application/json' \
+ --data-raw '{"zblock":"'$(ak-get-zlatest)'"}' \
+ "http://127.0.0.1:8610/v0/announce/zblock" \
+ 2>/dev/null | jq -M -c > /dev/null
if [ $? -ne 0 ]
then
logit "ERROR" "zblock $zblock announcement failed"