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