diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-11-07 00:28:12 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-11-07 00:28:12 +0100 |
commit | 63d9b82068e796869bf6ff648623acd33be27ebe (patch) | |
tree | bf78c773e0a708463d8b1be7d86bb56ce2de41b6 /inc | |
parent | bfd975d26ab51152ac6a256827ffda93b15df48b (diff) | |
download | rpg-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')
-rw-r--r-- | inc/infoutils.php | 4 |
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); |