Skip to content

Commit

Permalink
Merge pull request #122 from utopia-php/lohanidamodar-patch-1
Browse files Browse the repository at this point in the history
Retry if error code is >= 500
  • Loading branch information
lohanidamodar authored Dec 4, 2024
2 parents 0d9228f + b0abd44 commit 84737af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Storage/Device/S3.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 84737af

Please sign in to comment.