From 1a35e9683020a6d9402bf8a0a0e584457108a83c Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Mon, 29 Dec 2014 15:19:33 +0100 Subject: timeout after 2s when loading the schedule --- lib/program.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3