Skip to content

Commit

Permalink
Merge pull request #12 from answear/develop
Browse files Browse the repository at this point in the history
ANS-18103 timeout for guzzle
  • Loading branch information
lukasz-falda committed Sep 12, 2024
2 parents 1d23183 + 3a0590c commit 6885c96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

class Client
{
private const CONNECTION_TIMEOUT = 10;
private const TIMEOUT = 30;

private ClientInterface $client;

public function __construct(
Expand All @@ -23,6 +26,8 @@ public function __construct(
$this->client = $client ?? new GuzzleClient(
[
'base_uri' => rtrim($this->configProvider->baseUrl, '/') . '/',
'timeout' => self::TIMEOUT,
'connect_timeout' => self::CONNECTION_TIMEOUT
]
);
}
Expand Down

0 comments on commit 6885c96

Please sign in to comment.