diff --git a/src/RedLock.php b/src/RedLock.php index 5f6770a..dc56416 100644 --- a/src/RedLock.php +++ b/src/RedLock.php @@ -18,7 +18,7 @@ function __construct(array $servers, $retryDelay = 200, $retryCount = 3) $this->retryDelay = $retryDelay; $this->retryCount = $retryCount; - $this->quorum = min(count($servers), (count($servers) / 2 + 1)); + $this->quorum = min(count($servers), (intval(count($servers) / 2) + 1)); } public function lock($resource, $ttl)