[Lock] fix derivating semaphore from key

This commit is contained in:
Nicolas Grekas 2021-07-05 13:39:04 +02:00
parent 44f08fa121
commit d9dea8d761
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class SemaphoreStore implements StoreInterface, BlockingStoreInterface
return;
}
$keyId = crc32($key);
$keyId = unpack('i', md5($key, true))[1];
$resource = sem_get($keyId);
$acquired = @sem_acquire($resource, !$blocking);