Skip to content

Commit c6bfccc

Browse files
committed
Fix setting a null time limit
1 parent f3d5d73 commit c6bfccc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AsyncTask.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public function run(): void
119119
register_shutdown_function([$this, 'shutdownCheckTaskTimeout']);
120120
if (OsInfo::isWindows()) {
121121
// windows can just use PHP's time limit
122-
set_time_limit($this->timeLimit);
122+
if ($this->timeLimit > 0) {
123+
set_time_limit($this->timeLimit);
124+
}
123125
} else {
124126
// assume anything not Windows to be Unix
125127
// we already set it to kill this task after the timeout, so we just need to install a listener to catch the signal and exit gracefully

0 commit comments

Comments
 (0)