Skip to content

Commit

Permalink
Set timeout on JSON documents to 35s
Browse files Browse the repository at this point in the history
  • Loading branch information
coreation committed Jun 12, 2017
1 parent 7fcfc17 commit bb1bacd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Tdt/Core/DataControllers/JSONController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private function getPlainJson($uri)
$config = stream_context_create(array(
'http' => array(
'method' => 'GET',
'timeout' => 2,
'timeout' => 35,
)
));

Expand Down Expand Up @@ -182,7 +182,7 @@ private function getRemoteData($url)

curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 9);
curl_setopt($c, CURLOPT_REFERER, $url);
curl_setopt($c, CURLOPT_TIMEOUT, 2);
curl_setopt($c, CURLOPT_TIMEOUT, 35);
curl_setopt($c, CURLOPT_AUTOREFERER, true);
curl_setopt($c, CURLOPT_ENCODING, 'gzip,deflate');
$data = curl_exec($c);
Expand Down

0 comments on commit bb1bacd

Please sign in to comment.