Skip to content

Commit

Permalink
avoid multiple paralell update checks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
splitbrain committed Nov 6, 2012
1 parent bfd975d commit 63d9b82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/infoutils.php
Expand Up @@ -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);
Expand Down

0 comments on commit 63d9b82

Please sign in to comment.