Fail hard only after 3 failed attempts
parent
c7ed20e9d8
commit
2c4c5dd764
|
@ -483,11 +483,15 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
|
|||
|
||||
break;
|
||||
} catch (\Exception $e) {
|
||||
if ($retries) {
|
||||
usleep(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($e instanceof RepositorySecurityException) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
if (!$retries) {
|
||||
if ($contents = $this->cache->read($cacheKey)) {
|
||||
if (!$this->degradedMode) {
|
||||
$this->io->write('<warning>'.$e->getMessage().'</warning>');
|
||||
|
@ -501,9 +505,6 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
|
|||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
usleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
|
Loading…
Reference in New Issue