Fix regression added in 602740d3

This commit is contained in:
Pavlo Yatsukhnenko
2018-12-22 15:30:46 +02:00
parent 743c7260fe
commit 3e7e1c833d
+1 -1
View File
@@ -1164,7 +1164,7 @@ ra_rehash_server(RedisArray *ra, zval *z_redis, zend_string *hostname, zend_bool
/* check that we're not moving to the same node. */
zval *z_target = ra_find_node(ra, Z_STRVAL_P(z_ele), Z_STRLEN_P(z_ele), &pos TSRMLS_CC);
if (z_target && zend_string_equals(hostname, ra->hosts[pos])) { /* different host */
if (z_target && !zend_string_equals(hostname, ra->hosts[pos])) { /* different host */
ra_move_key(Z_STRVAL_P(z_ele), Z_STRLEN_P(z_ele), z_redis, z_target TSRMLS_CC);
}