mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Add COMPOSER_DISABLE_NETWORK env var for debugging
This commit is contained in:
parent
e8c6948770
commit
fc03ab9bba
3 changed files with 26 additions and 1 deletions
|
@ -1044,7 +1044,12 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|||
return false;
|
||||
}
|
||||
|
||||
if (--$retries) {
|
||||
// special error code returned when network is being artificially disabled
|
||||
if ($e instanceof TransportException && $e->getStatusCode() === 499) {
|
||||
$retries = 0;
|
||||
}
|
||||
|
||||
if (--$retries > 0) {
|
||||
usleep(100000);
|
||||
|
||||
return $httpDownloader->add($filename, $options)->then($accept, $reject);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue