diff options
author | MaZderMind | 2014-12-29 15:19:33 +0100 |
---|---|---|
committer | MaZderMind | 2014-12-29 15:19:33 +0100 |
commit | 1a35e9683020a6d9402bf8a0a0e584457108a83c (patch) | |
tree | bfb2737a32309d786c249bc95f1f63a715ec9731 | |
parent | 249a86a414312dde48640cbc6f9348dd4878a6cc (diff) |
timeout after 2s when loading the schedule
Diffstat (limited to '')
-rw-r--r-- | lib/program.php | 4 |
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) |