From 54bc9548309253f9271a7c18566d058555c3d37d Mon Sep 17 00:00:00 2001 From: Netkas Date: Fri, 30 Jun 2023 00:55:51 -0400 Subject: [PATCH] Fixed bug where `\TamerLib > tm > run()` would return early even if the `$timeout` is set to 0. --- CHANGELOG.md | 7 +++++++ src/TamerLib/tm.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd0f6c0..d8df39e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.1] - Unreleased + +Minor bugfixes and improvements. + +### Fixed + - Fixed bug where `\TamerLib > tm > run()` would return early even if the `$timeout` is set to 0. + ## [2.0.0] - 2023-06-18 This version of TamerLib offers a comprehensive framework for implementing parallel processing in PHP applications. diff --git a/src/TamerLib/tm.php b/src/TamerLib/tm.php index 887a071..8922062 100644 --- a/src/TamerLib/tm.php +++ b/src/TamerLib/tm.php @@ -740,7 +740,7 @@ return; } - if((time() - $start_time) >= $timeout) + if($timeout > 0 && (time() - $start_time) >= $timeout) { return; }