Skip to content

Commit a9396a8

Browse files
committed
Better RedLock token
1 parent 7f340d1 commit a9396a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/mutex/RedisMutex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function acquire(string $key, int $expire): bool
7676
// 2.
7777
$acquired = 0;
7878
$errored = 0;
79-
$this->token = random_bytes(16);
79+
$this->token = bin2hex(random_bytes(16));
8080
$exception = null;
8181
foreach ($this->redisAPIs as $index => $redisAPI) {
8282
try {

0 commit comments

Comments
 (0)