Fix Retry-After handling

- closes #4543
This commit is contained in:
Markus Hoffrogge committed 2023-03-07 18:45:07 +01:00
1 parent ce629e8e70
commit 70f4cad2ca
1 file changed
+2 -2
+2 -2
View File
@@ -2229,8 +2229,8 @@ _send_signed_request() {
_debug3 _body "$_body"
fi
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *:" | cut -d : -f 2 | tr -d ' ' | tr -d '\r')
if [ "$code" = '503' ] || [ "$_retryafter" ]; then
_retryafter=$(echo "$responseHeaders" | grep -i "^Retry-After *: *[0-9]\+ *" | cut -d : -f 2 | tr -d ' ' | tr -d '\r')
if [ "$code" = '503' ]; then
_sleep_overload_retry_sec=$_retryafter
if [ -z "$_sleep_overload_retry_sec" ]; then
_sleep_overload_retry_sec=5
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.