From a10a894cbe244c4f9cad6e5b27c4292a635bf982 Mon Sep 17 00:00:00 2001 From: Damien Overeem Date: Thu, 22 Sep 2022 11:00:53 +0200 Subject: [PATCH] Set some reasonable timeouts for the api requests --- src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php b/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php index 6a2c145..5fb9270 100755 --- a/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php +++ b/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php @@ -13,6 +13,9 @@ class RDWOpenDataApiClient protected function createGuzzleClient(): Client { return new Client([ + 'connect_timeout' => 5, + 'timeout' => 10, + 'http_errors' => false, 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json'