mirror of
https://github.com/friendica/friendica
synced 2024-11-19 02:23:41 +00:00
Merge pull request #7518 from nupplaphil/bug/lock_unlink
Fix Lock-Unlink
This commit is contained in:
commit
feb720a3ee
1 changed files with 4 additions and 2 deletions
|
@ -68,8 +68,10 @@ class SemaphoreLock extends Lock
|
|||
|
||||
if (!empty(self::$semaphore[$key])) {
|
||||
try {
|
||||
$success = @sem_release(self::$semaphore[$key]) &&
|
||||
unlink(self::keyToFile($key));
|
||||
$success = @sem_release(self::$semaphore[$key]);
|
||||
if (file_exists(self::keyToFile($key)) && $success) {
|
||||
$success = unlink(self::keyToFile($key));
|
||||
}
|
||||
unset(self::$semaphore[$key]);
|
||||
$this->markRelease($key);
|
||||
} catch (\Exception $exception) {
|
||||
|
|
Loading…
Reference in a new issue