MDL-60838 core_search: File upload does not honour timeout
authorsam marshall <s.marshall@open.ac.uk>
Thu, 16 Nov 2017 16:50:08 +0000 (16:50 +0000)
committersam marshall <s.marshall@open.ac.uk>
Fri, 24 Nov 2017 11:00:45 +0000 (11:00 +0000)
search/engine/solr/classes/engine.php

index 55206d3..1f0a1be 100644 (file)
@@ -1227,6 +1227,9 @@ class engine extends \core_search\engine {
             }
         }
 
+        // Set timeout as for Solr client.
+        $options['CURLOPT_TIMEOUT'] = !empty($this->config->server_timeout) ? $this->config->server_timeout : '30';
+
         $this->curl->setopt($options);
 
         if (!empty($this->config->server_username) && !empty($this->config->server_password)) {