summaryrefslogtreecommitdiff
path: root/inc/infoutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-07 00:28:12 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-07 00:28:12 +0100
commit63d9b82068e796869bf6ff648623acd33be27ebe (patch)
treebf78c773e0a708463d8b1be7d86bb56ce2de41b6 /inc/infoutils.php
parentbfd975d26ab51152ac6a256827ffda93b15df48b (diff)
downloadrpg-63d9b82068e796869bf6ff648623acd33be27ebe.tar.gz
rpg-63d9b82068e796869bf6ff648623acd33be27ebe.tar.bz2
avoid multiple paralell update checks
we now touch the messages before the actual update happens. this should lower the chance of more than one update check running at a time.
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r--inc/infoutils.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 7ceeae8f1..dfd6554e7 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -25,12 +25,12 @@ function checkUpdateMessages(){
// check if new messages needs to be fetched
if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
+ @touch($cf);
dbglog("checkUpdatesMessages(): downloading messages.txt");
$http = new DokuHTTPClient();
- $http->timeout = 8;
+ $http->timeout = 12;
$data = $http->get(DOKU_MESSAGEURL.$updateVersion);
io_saveFile($cf,$data);
- @touch($cf);
}else{
dbglog("checkUpdatesMessages(): messages.txt up to date");
$data = io_readFile($cf);