Skip to content

Commit 1d0ab53

Browse files
committed
Do not check for time limit if the limit is not set
1 parent d2e9953 commit 1d0ab53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/AsyncTask.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ private function hasTimedOut(): bool
321321
}
322322
unset($lastError);
323323

324+
// the remaining checks use the time-limit variable, so if it is unset, then there is nothing to check
325+
if ($this->timeLimit <= 0) {
326+
return false;
327+
}
328+
324329
// not a runtime timeout; one of the following:
325330
// it ended within the time limit; or
326331
// on Unix, it ran out of time so it is getting a SIGTERM from us; or

0 commit comments

Comments
 (0)