mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +00:00
Fix Locks
- Wrong return of lock releasing with DBA provider - It's not possible to maintain Semaphore locks, since they aren't accessible by other processes Should solve https://github.com/friendica/friendica/issues/7298#issuecomment-521996540
This commit is contained in:
parent
e8561b480b
commit
c803dcb6c5
4 changed files with 74 additions and 48 deletions
|
@ -82,7 +82,11 @@ class DatabaseLock extends Lock
|
|||
$where = ['name' => $key, 'pid' => $this->pid];
|
||||
}
|
||||
|
||||
$return = $this->dba->delete('locks', $where);
|
||||
if ($this->dba->exists('locks', $where)) {
|
||||
$return = $this->dba->delete('locks', $where);
|
||||
} else {
|
||||
$return = false;
|
||||
}
|
||||
|
||||
$this->markRelease($key);
|
||||
|
||||
|
@ -105,7 +109,7 @@ class DatabaseLock extends Lock
|
|||
|
||||
$this->acquiredLocks = [];
|
||||
|
||||
return $return;
|
||||
return $return && $success;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue