Skip to content

Commit

Permalink
Retry if error code is >= 500
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar authored Dec 4, 2024
1 parent 0d9228f commit b0abd44
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 b0abd44

Please sign in to comment.