From: Alexandre Alapetite Date: Fri, 7 Jul 2017 16:26:43 +0000 (+0200) Subject: Order of semaphore processing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=84972623f766a280a5b2901f3bac9dc9b0334a0b;p=friendica.git Order of semaphore processing --- diff --git a/src/Util/Lock.php b/src/Util/Lock.php index ca75b0d666..82d2fdda91 100644 --- a/src/Util/Lock.php +++ b/src/Util/Lock.php @@ -160,9 +160,9 @@ class Lock { if (empty(self::$semaphore[$fn_name])) { return false; } else { - $rid = self::$semaphore[$fn_name]; + $success = @sem_release(self::$semaphore[$fn_name]); self::$semaphore[$fn_name] = 0; - return @sem_release($rid); + return $success; } }