Commit 922131fd authored by Bert Balcaen's avatar Bert Balcaen
Browse files

Making timeout configurable.

parent 2a722c00
......@@ -18,6 +18,9 @@ class SolrServiceProvider extends ServiceProvider
{
$this->app->singleton(Client::class, function () {
$adapter = new \Solarium\Core\Client\Adapter\Curl();
if (config('solr.endpoint.localhost.timeout')) {
$adapter->setTimeout(config('solr.endpoint.localhost.timeout'));
}
$eventDispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
return new Client($adapter, $eventDispatcher, config('solr'));
});
......
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