From b0abd445f7b8047f2481da3e2ba5b1be00f31600 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 4 Dec 2024 13:53:57 +0545 Subject: [PATCH] Retry if error code is >= 500 --- src/Storage/Device/S3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storage/Device/S3.php b/src/Storage/Device/S3.php index c21bb9c..7631cab 100644 --- a/src/Storage/Device/S3.php +++ b/src/Storage/Device/S3.php @@ -948,7 +948,7 @@ protected function call(string $method, string $uri, string $data = '', array $p $response->code = \curl_getinfo($curl, CURLINFO_HTTP_CODE); $attempt = 0; - while ($attempt < self::$retryAttempts && $response->code === 503) { + while ($attempt < self::$retryAttempts && $response->code >= 500) { usleep(self::$retryDelay * 1000); $attempt++; $result = \curl_exec($curl);