Skip to content

Commit

Permalink
Issue #1591 (#1592)
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Jul 12, 2019
1 parent a5dfff3 commit 327cf0b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cluster_library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,9 +1266,11 @@ PHP_REDIS_API void cluster_disconnect(redisCluster *c, int force TSRMLS_DC) {

/* We also want to disconnect any slave connections so they will be pooled
* in the event we are using persistent connections and connection pooling. */
ZEND_HASH_FOREACH_PTR(node->slaves, slave) {
redis_sock_disconnect(slave->sock, force TSRMLS_CC);
} ZEND_HASH_FOREACH_END();
if (node->slaves) {
ZEND_HASH_FOREACH_PTR(node->slaves, slave) {
redis_sock_disconnect(slave->sock, force TSRMLS_CC);
} ZEND_HASH_FOREACH_END();
}
} ZEND_HASH_FOREACH_END();
}

Expand Down

0 comments on commit 327cf0b

Please sign in to comment.