From 9c8f258f615c6198213bf70c1859edbcbc2a5cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Mon, 25 Oct 2021 00:35:41 +0300 Subject: [PATCH] Added timeout value to Guzzle client --- src/bb-di.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bb-di.php b/src/bb-di.php index 18f508548..ffc8a52a6 100644 --- a/src/bb-di.php +++ b/src/bb-di.php @@ -261,7 +261,12 @@ $di['validator'] = function () use ($di){ return $validator; }; $di['guzzle_client'] = function () use($di) { - return new GuzzleHttp\Client(['headers' => ['User-Agent' => $di['config']['guzzle']['user_agent']]]); + return new GuzzleHttp\Client([ + 'headers' => [ + 'User-Agent' => $di['config']['guzzle']['user_agent'] + ], + 'timeout' => $di['config']['guzzle']['timeout'] + ]); }; $di['mail'] = function () { return new Box_Mail();