aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaZderMind2014-12-29 15:19:33 +0100
committerMaZderMind2014-12-29 15:19:33 +0100
commit1a35e9683020a6d9402bf8a0a0e584457108a83c (patch)
treebfb2737a32309d786c249bc95f1f63a715ec9731 /lib
parent249a86a414312dde48640cbc6f9348dd4878a6cc (diff)
timeout after 2s when loading the schedule
Diffstat (limited to 'lib')
-rw-r--r--lib/program.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/program.php b/lib/program.php
index 721abea..07e6077 100644
--- a/lib/program.php
+++ b/lib/program.php
@@ -3,7 +3,9 @@
function program()
{
$program = array();
- $schedule = file_get_contents($GLOBALS['CONFIG']['SCHEDULE']);
+ $opts = array('http' => array('timeout' => 2));
+ $context = stream_context_create($opts);
+ $schedule = file_get_contents($GLOBALS['CONFIG']['SCHEDULE'], false, $context);
// loading failed, try tmp-file
if(!$schedule)