From 63d9b82068e796869bf6ff648623acd33be27ebe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 7 Nov 2012 00:28:12 +0100 Subject: [PATCH] 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. --- inc/infoutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/infoutils.php b/inc/infoutils.php index 7ceeae8f19..dfd6554e73 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);