Skip to content

Commit

Permalink
update check timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ziracms committed Mar 3, 2020
1 parent 063c4d5 commit 78530ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dash/controllers/index.php
Expand Up @@ -218,7 +218,13 @@ public function notifications() {
if (Zira\Config::get('check_updates', 1)) {
$check_url = 'https://ziracms.github.io/version.txt';
try {
$check_version = @file_get_contents($check_url . '?t=' . time());
$context = stream_context_create(array(
'http' => array(
'method' => 'GET',
'timeout' => 1.0
)
));
$check_version = @file_get_contents($check_url . '?t=' . time(), false, $context);
} catch(\Exception $e) {
$check_version = false;
}
Expand Down

0 comments on commit 78530ea

Please sign in to comment.