Skip to content

Commit ac2846e

Browse files
author
Tim Massey
committed
Fixes bug where supplied option for timeout were ignored in constructor.
1 parent 8bedcf3 commit ac2846e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Github/HttpClient/HttpClient.php

Lines changed: 2 additions & 1 deletion
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)