Skip to content
Snippets Groups Projects
Commit 78d8ea14 authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Fix bug: timeout value not respected in EDS.ini.

- Related to erroneous factory implementation.
- Resolves VUFIND-1402.
parent 4d4153c1
No related merge requests found
...@@ -77,18 +77,8 @@ class Connector extends Base implements LoggerAwareInterface ...@@ -77,18 +77,8 @@ class Connector extends Base implements LoggerAwareInterface
* conjunction with the EDS API * conjunction with the EDS API
* <ul> * <ul>
* <li>debug - boolean to control debug mode</li> * <li>debug - boolean to control debug mode</li>
* <li>authtoken - Authentication to use for calls to the API. If using IP * <li>orgid - Organization making calls to the EDS API</li>
* Authentication, this is not needed.</li> * <li>timeout - HTTP timeout value (default = 120)</li>
* <li>username - EBSCO username for account setup for usage with the EDS
* API. This is only required for institutions using UID Authentication </li>
* <li>password - EBSCO password for account setup for usage with the EDS
* API. This is only required for institutions using UID Authentication </li>
* <li>orgid - Organization making calls to the EDS API </li>
* <li>sessiontoken - SessionToken this call is associated with, is one
* exists. If not, the a profile value must be present </li>
* <li>profile - EBSCO profile to use for calls to the API. </li>
* <li>isguest - is the user a guest. This needs to be present if there
* is no session token present</li>
* </ul> * </ul>
* @param HttpClient $client HTTP client object (optional) * @param HttpClient $client HTTP client object (optional)
*/ */
...@@ -96,7 +86,7 @@ class Connector extends Base implements LoggerAwareInterface ...@@ -96,7 +86,7 @@ class Connector extends Base implements LoggerAwareInterface
{ {
parent::__construct($settings); parent::__construct($settings);
$this->client = is_object($client) ? $client : new HttpClient(); $this->client = is_object($client) ? $client : new HttpClient();
$this->client->setOptions(['timeout' => 120]); $this->client->setOptions(['timeout' => $settings['timeout'] ?? 120]);
$adapter = new CurlAdapter(); $adapter = new CurlAdapter();
$adapter->setOptions( $adapter->setOptions(
[ [
......
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