From 29b1357cd2f5449e4e5af1126c3d99e37dc1c061 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Thu, 5 Jul 2018 14:39:58 -0700 Subject: Make HTTP client timeout configurable --- app/Core/Http/Client.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'app/Core') diff --git a/app/Core/Http/Client.php b/app/Core/Http/Client.php index 3793fa33..84099a23 100644 --- a/app/Core/Http/Client.php +++ b/app/Core/Http/Client.php @@ -13,20 +13,6 @@ use Kanboard\Job\HttpAsyncJob; */ class Client extends Base { - /** - * HTTP connection timeout in seconds - * - * @var integer - */ - const HTTP_TIMEOUT = 10; - - /** - * Number of maximum redirections for the HTTP client - * - * @var integer - */ - const HTTP_MAX_REDIRECTS = 2; - /** * HTTP client user agent * @@ -225,8 +211,8 @@ class Client extends Base 'http' => [ 'method' => $method, 'protocol_version' => 1.1, - 'timeout' => self::HTTP_TIMEOUT, - 'max_redirects' => self::HTTP_MAX_REDIRECTS, + 'timeout' => HTTP_TIMEOUT, + 'max_redirects' => HTTP_MAX_REDIRECTS, 'header' => implode("\r\n", $headers), 'content' => $content, 'ignore_errors' => $raiseForErrors, -- cgit v1.2.3