aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_messenger.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index ae0f7823cc..e837811c86 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -715,9 +715,11 @@ class queue
$lock_fp = $this->lock();
- if (!file_exists($this->cache_file) || $config['last_queue_run'] > time() - $config['queue_interval'])
+ // avoid races, check file existence once
+ $have_cache_file = file_exists($this->cache_file);
+ if (!$have_cache_file || $config['last_queue_run'] > time() - $config['queue_interval'])
{
- if (!file_exists($this->cache_file))
+ if (!$have_cache_file)
{
set_config('last_queue_run', time(), true);
}