From 5234e64e97fe9f1010ed9fdfbba25151f4514876 Mon Sep 17 00:00:00 2001 From: Albert Casademont Date: Fri, 26 Jul 2013 15:33:23 +0200 Subject: [PATCH] Retry file download also on Internal Server Error 500 code as is mostly a temporary glitch (at least on GitHub) --- src/Composer/Downloader/FileDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Downloader/FileDownloader.php index dbbb2328a..292b24f59 100644 --- a/src/Composer/Downloader/FileDownloader.php +++ b/src/Composer/Downloader/FileDownloader.php @@ -107,7 +107,7 @@ class FileDownloader implements DownloaderInterface break; } catch (TransportException $e) { // 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; } if ($this->io->isVerbose()) {