1
0
Fork 0

Merge pull request #2397 from smaftoul/patch-1

Retry on some 5xx errors
pull/2399/head
Jordi Boggiano 2013-11-04 06:27:14 -08:00
commit e243b4edd1
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,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() && 500 !== $e->getCode()) || !$retries) { if ((0 !== $e->getCode() && !in_array($e->getCode(),array(500, 502, 503, 504))) || !$retries) {
throw $e; throw $e;
} }
if ($this->io->isVerbose()) { if ($this->io->isVerbose()) {