Skip to content

Commit 8c62591

Browse files
[Lock] fix derivating semaphore from key
1 parent 246f802 commit 8c62591

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Store/SemaphoreStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private function lock(Key $key, bool $blocking)
6363
return;
6464
}
6565

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

0 commit comments

Comments
 (0)