summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-05-25 12:29:14 +0200
committerantirez <antirez@gmail.com>2011-05-25 12:29:14 +0200
commitcc958ccf42e0e56d0514bb2b4ba3c4295b0c87e6 (patch)
treef6101f39ba84cf16389c40f010778f5754b2263d
parent480a2e73cff1ab493ac3562d47c37eb7189d2df6 (diff)
downloadredis-cc958ccf42e0e56d0514bb2b4ba3c4295b0c87e6.tar.gz
Fix for Pub/Sub system, introduced in Redis 2.2.6 with the new copy-on-write safe iterator semantics. In the hope this is the last bug I introduced this way.
-rw-r--r--src/pubsub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pubsub.c b/src/pubsub.c
index 2bd3d0580..728e559c9 100644
--- a/src/pubsub.c
+++ b/src/pubsub.c
@@ -141,7 +141,7 @@ int pubsubUnsubscribePattern(redisClient *c, robj *pattern, int notify) {
/* Unsubscribe from all the channels. Return the number of channels the
* client was subscribed from. */
int pubsubUnsubscribeAllChannels(redisClient *c, int notify) {
- dictIterator *di = dictGetIterator(c->pubsub_channels);
+ dictIterator *di = dictGetSafeIterator(c->pubsub_channels);
dictEntry *de;
int count = 0;