From 5192722343fdc8f5fc6ac99cd7562ad836bdc041 Mon Sep 17 00:00:00 2001 From: Lukasz Falda <55883656+lukasz-falda@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:43:02 +0200 Subject: [PATCH] ANS-18103 - timeout for guzzle client --- src/Client/Client.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Client/Client.php b/src/Client/Client.php index 2f2dd4f..77a96b2 100644 --- a/src/Client/Client.php +++ b/src/Client/Client.php @@ -14,6 +14,9 @@ class Client { + private const CONNECTION_TIMEOUT = 10; + private const TIMEOUT = 30; + private ClientInterface $client; public function __construct( @@ -23,6 +26,8 @@ public function __construct( $this->client = $client ?? new GuzzleClient( [ 'base_uri' => $this->configProvider->baseUrl, + 'timeout' => self::TIMEOUT, + 'connect_timeout' => self::CONNECTION_TIMEOUT ] ); }