Skip to content

Commit e55c465

Browse files
committed
Merge pull request #66 from tim-massey/options
Fixes bug where supplied option for timeout was ignored in constructor.
2 parents 5312ea5 + ac2846e commit e55c465

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Github/HttpClient/HttpClient.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class HttpClient implements HttpClientInterface
5555
public function __construct(array $options = array(), ClientInterface $client = null)
5656
{
5757
$client = $client ?: new Curl();
58-
$client->setTimeout($this->options['timeout']);
58+
$timeout = isset($options['timeout']) ? $options['timeout'] : $this->options['timeout'];
59+
$client->setTimeout($timeout);
5960
$client->setVerifyPeer(false);
6061

6162
$this->options = array_merge($this->options, $options);

0 commit comments

Comments
 (0)