]> git.saurik.com Git - redis.git/blobdiff - src/pubsub.c
Fixed bug in AOF rewrite not working because of integer overflow
[redis.git] / src / pubsub.c
index 23b0ceb0bcece1db097828047f19f680133c40f5..728e559c9e4c563067c5fd2ce8417fc9ec0b5061 100644 (file)
@@ -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;
 
@@ -262,7 +262,6 @@ void punsubscribeCommand(redisClient *c) {
 }
 
 void publishCommand(redisClient *c) {
-    c->argv[2] = tryObjectEncoding(c->argv[2]);
     int receivers = pubsubPublishMessage(c->argv[1],c->argv[2]);
     addReplyLongLong(c,receivers);
 }