Skip to content

Commit

Permalink
Merge pull request #361 from mattwillo/master
Browse files Browse the repository at this point in the history
Bug fix for cluster server connection setup
  • Loading branch information
ruflin committed Apr 9, 2013
2 parents 2313b60 + 20f4b2e commit dbc7ead
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Elastica/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ protected function _initConnections()
$this->_connections[] = Connection::create($connection);
}

if (isset($_config['servers'])) {
$this->_connections[] = Connection::create($this->getConfig('servers'));
if (isset($this->_config['servers'])) {
foreach ($this->getConfig('servers') as $server) {
$this->_connections[] = Connection::create($server);
}
}

// If no connections set, create default connection
Expand Down

0 comments on commit dbc7ead

Please sign in to comment.