8000 Issue #1591 (#1592) · phpredis/phpredis@5276474 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5276474

Browse files
yatsukhnenkomichael-grunder
authored andcommitted
Issue #1591 (#1592)
* Issue #1591 * Add notes to Changelog
1 parent 905b641 commit 5276474

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All changes to phpredis will be documented in this file.
55
We're basing this format on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and PhpRedis adhears to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- RedisCluster segfaults after second connection with cache_slots enabled [f52cd237](https://github.com/phpredis/phpredis/pull/1592/commits/f52cd237)
13+
([Pavlo Yatsukhnenko](https://github.com/yatsukhnenko))
14+
15+
---
16+
817
## [5.0.0] - 2019-07-02 ([GitHub](https://github.com/phpredis/phpredis/releases/tag/5.0.0), [PECL](https://pecl.php.net/package/redis/5.0.0))
918

1019
This release contains important improvements and breaking changes. The most

cluster_library.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,9 +1266,11 @@ PHP_REDIS_API void cluster_disconnect(redisCluster *c, int force TSRMLS_DC) {
12661266

12671267
/* We also want to disconnect any slave connections so they will be pooled
12681268
* in the event we are using persistent connections and connection pooling. */
1269-
ZEND_HASH_FOREACH_PTR(node->slaves, slave) {
1270-
redis_sock_disconnect(slave->sock, force TSRMLS_CC);
1271-
} ZEND_HASH_FOREACH_END();
1269+
if (node->slaves) {
1270+
ZEND_HASH_FOREACH_PTR(node->slaves, slave) {
1271+
redis_sock_disconnect(slave->sock, force TSRMLS_CC);
1272+
} ZEND_HASH_FOREACH_END();
1273+
}
12721274
} ZEND_HASH_FOREACH_END();
12731275
}
12741276

0 commit comments

Comments
 (0)
0