Retry file download also on Internal Server Error 500 code as is mostly a temporary glitch (at least on GitHub)
parent
1d91e43587
commit
5234e64e97
|
@ -107,7 +107,7 @@ class FileDownloader implements DownloaderInterface
|
||||||
break;
|
break;
|
||||||
} catch (TransportException $e) {
|
} catch (TransportException $e) {
|
||||||
// if we got an http response with a proper code, then requesting again will probably not help, abort
|
// if we got an http response with a proper code, then requesting again will probably not help, abort
|
||||||
if (0 !== $e->getCode() || !$retries) {
|
if ((0 !== $e->getCode() && 500 !== $e->getCode()) || !$retries) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
if ($this->io->isVerbose()) {
|
if ($this->io->isVerbose()) {
|
||||||
|
|
Loading…
Reference in New Issue