From 27baeca11264d016de663d50e7ffa07b1c44465d Mon Sep 17 00:00:00 2001 From: Netkas Date: Tue, 24 Oct 2023 16:07:05 -0400 Subject: [PATCH] Set default process timeouts to null This commit sets the default timeout and idleTimeout for the execution process in ExecutionUnitRunner to null when there are no specific timeouts provided by the execution policy. This change was made to avoid unexpected timeouts when no specific values are set in the execution policy. --- CHANGELOG.md | 1 + src/ncc/Classes/ExecutionUnitRunner.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf1754e..54efccc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This update introduces minor bug fixes. - Updated file tracking in Runtime class - Fixed division by zero in ConsoleProgressBar - Fixed issue where progress bar is displayed in VERBOSE mode + - Set default process timeouts to null ## [2.0.3] - 2023-10-17 diff --git a/src/ncc/Classes/ExecutionUnitRunner.php b/src/ncc/Classes/ExecutionUnitRunner.php index c82ce5e..ab61bf8 100644 --- a/src/ncc/Classes/ExecutionUnitRunner.php +++ b/src/ncc/Classes/ExecutionUnitRunner.php @@ -76,11 +76,19 @@ { $process->setTimeout($unit->getExecutionPolicy()->getExecute()->getTimeout()); } + else + { + $process->setTimeout(null); + } if($unit->getExecutionPolicy()->getExecute()->getIdleTimeout() !== null) { $process->setIdleTimeout($unit->getExecutionPolicy()->getExecute()->getIdleTimeout()); } + else + { + $process->setIdleTimeout(null); + } return $process; }