Tentative de régler le bordel
This commit is contained in:
@@ -110,6 +110,13 @@ class db
|
||||
// process we failed to acquire the lock.
|
||||
$this->locked = $this->config->set_atomic($this->config_name, $lock_value, $this->unique_id, false);
|
||||
|
||||
if ($this->locked == true)
|
||||
{
|
||||
if ($this->config->ensure_lock($this->config_name, $this->unique_id))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return $this->locked;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,10 @@ class flock
|
||||
|
||||
if ($this->lock_fp)
|
||||
{
|
||||
@flock($this->lock_fp, LOCK_EX);
|
||||
if (!@flock($this->lock_fp, LOCK_EX))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(500, 'Failure while aqcuiring locks.');
|
||||
}
|
||||
}
|
||||
|
||||
return (bool) $this->lock_fp;
|
||||
|
||||
Reference in New Issue
Block a user