<?php
/**
- * Copyright 2017
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Aaron Schulz
*/
use Psr\Log\LoggerAwareInterface;
'encoding' => 'JSON',
'cacheTTL' => 10,
'skewTTL' => 1,
- 'timeout' => 10
+ 'timeout' => 2
];
$this->host = $params['host'];
$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 ) {
}
// Avoid the server next time if that failed
- $dsd->removeServer( $server, $servers );
+ $servers = $dsd->removeServer( $server, $servers );
} while ( $servers );
return [ $config, $error, $retry ];