Merge remote-tracking branch 'origin/pr/116' into v0.8

This commit is contained in:
Daniele Alessandri
2013-05-31 11:30:30 +02:00
@@ -236,10 +236,10 @@ class PhpiredisConnection extends AbstractConnection
$host = $parameters->host;
if (ip2long($host) === false) {
if (($address = gethostbyname($host)) === $host) {
if (($addresses = gethostbynamel($host)) === false) {
$this->onConnectionError("Cannot resolve the address of $host");
}
return $address;
return $addresses[array_rand($addresses)];
}
return $host;