mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-27 07:21:53 +00:00
commit
f286f904dc
12
acme.sh
12
acme.sh
@ -1795,15 +1795,13 @@ _send_signed_request() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ACME_VERSION" = "2" ]; then
|
|
||||||
__request_conent_type="$CONTENT_TYPE_JSON"
|
__request_conent_type="$CONTENT_TYPE_JSON"
|
||||||
else
|
|
||||||
__request_conent_type=""
|
|
||||||
fi
|
|
||||||
payload64=$(printf "%s" "$payload" | _base64 | _url_replace)
|
payload64=$(printf "%s" "$payload" | _base64 | _url_replace)
|
||||||
_debug3 payload64 "$payload64"
|
_debug3 payload64 "$payload64"
|
||||||
|
|
||||||
MAX_REQUEST_RETRY_TIMES=5
|
MAX_REQUEST_RETRY_TIMES=20
|
||||||
|
_sleep_retry_sec=1
|
||||||
_request_retry_times=0
|
_request_retry_times=0
|
||||||
while [ "${_request_retry_times}" -lt "$MAX_REQUEST_RETRY_TIMES" ]; do
|
while [ "${_request_retry_times}" -lt "$MAX_REQUEST_RETRY_TIMES" ]; do
|
||||||
_request_retry_times=$(_math "$_request_retry_times" + 1)
|
_request_retry_times=$(_math "$_request_retry_times" + 1)
|
||||||
@ -1898,9 +1896,9 @@ _send_signed_request() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if _contains "$_body" "JWS has invalid anti-replay nonce" || _contains "$_body" "JWS has an invalid anti-replay nonce"; then
|
if _contains "$_body" "JWS has invalid anti-replay nonce" || _contains "$_body" "JWS has an invalid anti-replay nonce"; then
|
||||||
_info "It seems the CA server is busy now, let's wait and retry."
|
_info "It seems the CA server is busy now, let's wait and retry. Sleeping $_sleep_retry_sec seconds."
|
||||||
_CACHED_NONCE=""
|
_CACHED_NONCE=""
|
||||||
_sleep 5
|
_sleep $_sleep_retry_sec
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user