]> git.mxchange.org Git - friendica.git/commitdiff
Order of semaphore processing
authorAlexandre Alapetite <alexandre.alapetite@alexandra.dk>
Fri, 7 Jul 2017 16:26:43 +0000 (18:26 +0200)
committerAlexandre Alapetite <alexandre.alapetite@alexandra.dk>
Fri, 7 Jul 2017 16:26:43 +0000 (18:26 +0200)
src/Util/Lock.php

index ca75b0d666daa433e9dfccbb7ba55b24688eee62..82d2fdda91d01c3a2606333db2419d5f9badf903 100644 (file)
@@ -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;
                        }
                }