Skip to content

Commit

Permalink
Merge pull request #66 from tim-massey/options
Browse files Browse the repository at this point in the history
Fixes bug where supplied option for timeout was ignored in constructor.
  • Loading branch information
pilot committed Aug 30, 2013
2 parents 5312ea5 + ac2846e commit e55c465
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Github/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class HttpClient implements HttpClientInterface
public function __construct(array $options = array(), ClientInterface $client = null)
{
$client = $client ?: new Curl();
$client->setTimeout($this->options['timeout']);
$timeout = isset($options['timeout']) ? $options['timeout'] : $this->options['timeout'];
$client->setTimeout($timeout);
$client->setVerifyPeer(false);

$this->options = array_merge($this->options, $options);
Expand Down

0 comments on commit e55c465

Please sign in to comment.