From ac2846e05c18a34099370550bc00f55e00f61248 Mon Sep 17 00:00:00 2001 From: Tim Massey Date: Mon, 5 Aug 2013 11:50:06 +1000 Subject: [PATCH] Fixes bug where supplied option for timeout were ignored in constructor. --- lib/Github/HttpClient/HttpClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Github/HttpClient/HttpClient.php b/lib/Github/HttpClient/HttpClient.php index ef82a2a0044..d118a2d73cb 100644 --- a/lib/Github/HttpClient/HttpClient.php +++ b/lib/Github/HttpClient/HttpClient.php @@ -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);