X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fconfig%2FEtcdConfig.php;h=c57eba7ceb638a2f9853e5e005ed2f9c920137e2;hb=c6d1ceb90a9684fa0da758d88ba1e994fad4cffc;hp=fd5c3f705a029739d60ebee63bcfe988e72cf44a;hpb=6f466c166e3ba5ea8f2e1a37bc32d3c02901c3e0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/config/EtcdConfig.php b/includes/config/EtcdConfig.php index fd5c3f705a..c57eba7ceb 100644 --- a/includes/config/EtcdConfig.php +++ b/includes/config/EtcdConfig.php @@ -1,7 +1,5 @@ 'JSON', 'cacheTTL' => 10, 'skewTTL' => 1, - 'timeout' => 10 + 'timeout' => 2 ]; $this->host = $params['host']; @@ -95,12 +92,14 @@ class EtcdConfig implements Config, LoggerAwareInterface { $this->logger = new Psr\Log\NullLogger(); $this->http = new MultiHttpClient( [ 'connTimeout' => $this->timeout, - 'reqTimeout' => $this->timeout + 'reqTimeout' => $this->timeout, + 'logger' => $this->logger ] ); } public function setLogger( LoggerInterface $logger ) { $this->logger = $logger; + $this->http->setLogger( $logger ); } public function has( $name ) { @@ -215,7 +214,7 @@ class EtcdConfig implements Config, LoggerAwareInterface { } // Avoid the server next time if that failed - $dsd->removeServer( $server, $servers ); + $servers = $dsd->removeServer( $server, $servers ); } while ( $servers ); return [ $config, $error, $retry ];