1
0
Fork 0

Fail hard only after 3 failed attempts

pull/1609/head
Jordi Boggiano 2013-02-21 18:16:54 +01:00
parent c7ed20e9d8
commit 2c4c5dd764
1 changed files with 13 additions and 12 deletions

View File

@ -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;