From cc958ccf42e0e56d0514bb2b4ba3c4295b0c87e6 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 25 May 2011 12:29:14 +0200 Subject: [PATCH] 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. --- src/pubsub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- GitLab