From ee48687222b6660977cf2785e69dbe90544a91bd Mon Sep 17 00:00:00 2001 From: Nathan Bishop Date: Tue, 21 May 2019 14:29:17 +1000 Subject: [PATCH] Prevent timeouts on API fetches --- src/Repository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Repository.php b/src/Repository.php index f3a0a3d..e761e36 100644 --- a/src/Repository.php +++ b/src/Repository.php @@ -174,6 +174,8 @@ public function getMilestones(array $params = []): Generator */ private function fetch(string $url): Generator { + set_time_limit(15); // prevent timeouts - time limit is reset on every recursive call + $response = fopen($url, 'r', false, $this->context); if (!$response) {