Browse Source

Fixed a bug in HashRing::remove()

Daniele Alessandri 16 years ago
parent
commit
1a8f832d6c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -692,7 +692,7 @@ class HashRing {
     public function remove($node) {
         $nodeHash = (string) $node;
         for ($i = 0; $i < $this->_replicas; $i++) {
-            $key = crc32($nodeHash . '_' . $i);
+            $key = crc32($nodeHash . ':' . $i);
             unset($this->_ring[$key]);
             $this->_ringKeys = array_filter($this->_ringKeys, function($rk) use($key) {
                 return $rk !== $key;