mirror of
https://github.com/friendica/friendica
synced 2024-11-10 08:22:57 +00:00
Merge pull request #3554 from Alkarex/semaphore_warning
Hide semaphore warning
This commit is contained in:
commit
8863f0e234
1 changed files with 8 additions and 3 deletions
|
@ -156,9 +156,14 @@ class Lock {
|
|||
* @param string $fn_name Name of the lock
|
||||
*/
|
||||
public static function remove($fn_name) {
|
||||
if (function_exists('sem_get') && self::$semaphore[$fn_name]) {
|
||||
sem_release(self::$semaphore[$fn_name]);
|
||||
return;
|
||||
if (function_exists('sem_get')) {
|
||||
if (empty(self::$semaphore[$fn_name])) {
|
||||
return false;
|
||||
} else {
|
||||
$success = @sem_release(self::$semaphore[$fn_name]);
|
||||
unset(self::$semaphore[$fn_name]);
|
||||
return $success;
|
||||
}
|
||||
}
|
||||
|
||||
$memcache = self::connectMemcache();
|
||||
|
|
Loading…
Reference in a new issue