Skip to content

Commit

Permalink
Prevent timeouts on API fetches
Browse files Browse the repository at this point in the history
  • Loading branch information
nbish11 committed May 21, 2019
1 parent 8b08051 commit ee48687
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ee48687

Please sign in to comment.