Commit 17c59842 authored by Bas de Nooijer's avatar Bas de Nooijer

Moved function call outside loop

parent a5f9a05e
...@@ -470,7 +470,8 @@ class Loadbalancer extends AbstractPlugin ...@@ -470,7 +470,8 @@ class Loadbalancer extends AbstractPlugin
$adapter = $this->client->getAdapter(); $adapter = $this->client->getAdapter();
if ($this->getFailoverEnabled() == true) { if ($this->getFailoverEnabled() == true) {
for ($i = 0; $i <= $this->getFailoverMaxRetries(); $i++) { $maxRetries = $this->getFailoverMaxRetries();
for ($i = 0; $i <= $maxRetries; $i++) {
$endpoint = $this->getRandomEndpoint(); $endpoint = $this->getRandomEndpoint();
try { try {
return $adapter->execute($request, $endpoint); return $adapter->execute($request, $endpoint);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment