sforkowany z mirror/friendica
Fix Lock-Unlink
- Check if .sem file exists before unlinking it - Fixing https://github.com/friendica/friendica/issues/7298#issuecomment-5216704822022.09-rc
rodzic
48caf55cff
commit
2369ea1d50
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue