Skip to content

Commit 982c54b

Browse files
committed
fix #4530
1 parent 67f5433 commit 982c54b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

acme.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2230,7 +2230,11 @@ _send_signed_request() {
22302230
fi
22312231

22322232
if [ "$code" = '503' ]; then
2233-
_sleep_overload_retry_sec=3
2233+
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *:" | cut -d : -f 2 | tr -d ' ' | tr -d '\r')
2234+
_sleep_overload_retry_sec=$_retryafter
2235+
if [ -z "$_sleep_overload_retry_sec" ]; then
2236+
_sleep_overload_retry_sec=5
2237+
fi
22342238
_info "It seems the CA server is currently overloaded, let's wait and retry. Sleeping $_sleep_overload_retry_sec seconds."
22352239
_sleep $_sleep_overload_retry_sec
22362240
continue

0 commit comments

Comments
 (0)