From 2c5258f5033c0fa44e9e9e3b38ac66eac8c8a750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sipos=20Andr=C3=A1s?= Date: Tue, 1 Apr 2025 12:35:17 +0200 Subject: [PATCH] use grok.timeout config @see: https://github.com/grok-php/laravel/issues/2 --- src/Config/GrokConfig.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Config/GrokConfig.php b/src/Config/GrokConfig.php index 1eec9bb..036b123 100644 --- a/src/Config/GrokConfig.php +++ b/src/Config/GrokConfig.php @@ -23,6 +23,8 @@ public function __construct( if (! $this->apiKey) { throw GrokException::missingApiKey(); } - $this->timeout = $timeout ?? (int) DefaultConfig::TIMEOUT->value; + $this->timeout = $this->timeout !== 0 + ? $this->timeout + : ((int) config('grok.timeout') ?: (int) DefaultConfig::TIMEOUT->value); } }