Skip to content

Commit d1f4315

Browse files
Merge branch '5.4' into 6.0
* 5.4: [VarExporter] fix tests on Windows [GHA] Fix psalm job Fix CS [PropertyInfo] strip only leading `\` when unknown docType [RateLimiter] Fix rate serialization for long intervals (monthly and yearly) ignoring exception from sem_get in SemaphoreStore Lock component, preventing of error: identifier removed [Console] Fix compact table style to avoid outputting a leading space fix: stringify from address for ses+api transport [Mailer] Use recipients in sendmail transport [Serializer] Fix nested deserialization_path computation when there is no metadata for the attribute [Asset] Update the error message when assets are not built
2 parents 0cf4610 + 926f0c4 commit d1f4315

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Store/SemaphoreStore.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ private function lock(Key $key, bool $blocking)
6363
}
6464

6565
$keyId = unpack('i', md5($key, true))[1];
66-
$resource = sem_get($keyId);
67-
$acquired = @sem_acquire($resource, !$blocking);
66+
$resource = @sem_get($keyId);
67+
$acquired = $resource && @sem_acquire($resource, !$blocking);
6868

6969
while ($blocking && !$acquired) {
70-
$resource = sem_get($keyId);
71-
$acquired = @sem_acquire($resource);
70+
$resource = @sem_get($keyId);
71+
$acquired = $resource && @sem_acquire($resource);
7272
}
7373

7474
if (!$acquired) {

0 commit comments

Comments
 (0)