From: antirez Date: Wed, 25 May 2011 10:29:14 +0000 (+0200) Subject: Fix for Pub/Sub system, introduced in Redis 2.2.6 with the new copy-on-write safe... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/efc3408748061a08ec5ff18e392c30f31f5094a2 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. --- diff --git a/src/pubsub.c b/src/pubsub.c index 2bd3d058..728e559c 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;