From 2f1615bdfdd439bda946b52df46804dc56c2c289 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 20 Aug 2021 13:30:50 +0200 Subject: [PATCH] ParallelAnalyser - do not allow to go below the default timeout --- src/Parallel/ParallelAnalyser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Parallel/ParallelAnalyser.php b/src/Parallel/ParallelAnalyser.php index c0d4edcad7..1099bb341a 100644 --- a/src/Parallel/ParallelAnalyser.php +++ b/src/Parallel/ParallelAnalyser.php @@ -17,6 +17,8 @@ class ParallelAnalyser { + private const DEFAULT_TIMEOUT = 600.0; + private int $internalErrorsCountLimit; private float $processTimeout; @@ -32,7 +34,7 @@ public function __construct( ) { $this->internalErrorsCountLimit = $internalErrorsCountLimit; - $this->processTimeout = $processTimeout; + $this->processTimeout = max($processTimeout, self::DEFAULT_TIMEOUT); $this->decoderBufferSize = $decoderBufferSize; }