Skip to content

Commit

Permalink
Merge pull request #8 from answear/ANS-18103-timeout-for-guzzle-client
Browse files Browse the repository at this point in the history
ANS-18103 - timeout for guzzle client
  • Loading branch information
lukasz-falda authored Sep 12, 2024
2 parents a7911e6 + 5f68594 commit 8b8b857
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 ConfigProvider $configuration;
private ClientInterface $client;

Expand All @@ -25,6 +28,8 @@ public function __construct(
$this->client = $client ?? new GuzzleClient(
[
'base_uri' => $configuration->getUrl(),
'timeout' => self::TIMEOUT,
'connect_timeout' => self::CONNECTION_TIMEOUT
]
);
}
Expand Down

0 comments on commit 8b8b857

Please sign in to comment.