diff --git a/src/Client/Client.php b/src/Client/Client.php index ea70ceb..ea1cac1 100644 --- a/src/Client/Client.php +++ b/src/Client/Client.php @@ -13,12 +13,15 @@ class Client { + private const CONNECTION_TIMEOUT = 10; + private const TIMEOUT = 30; + public function __construct( private readonly RequestTransformerInterface $requestTransformer, private readonly FanCourierLogger $logger, private ?ClientInterface $client = null, ) { - $this->client ??= new GuzzleClient(); + $this->client ??= new GuzzleClient(['timeout' => self::TIMEOUT, 'connect_timeout' => self::CONNECTION_TIMEOUT]); } public function request(RequestInterface $request): ResponseInterface