From d5870d7ac3c4618bca373137559cb7c03c66e17d Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 31 Jan 2011 16:49:56 +0100 Subject: [PATCH 1/2] Reply with single null bulk for unsuccesful BRPOPLPUSH --- src/t_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_list.c b/src/t_list.c index 1c658353..c9ec2e67 100644 --- a/src/t_list.c +++ b/src/t_list.c @@ -941,7 +941,7 @@ void brpoplpushCommand(redisClient *c) { /* Blocking against an empty list in a multi state * returns immediately. */ - addReply(c, shared.nullmultibulk); + addReply(c, shared.nullbulk); } else { /* The list is empty and the client blocks. */ blockForKeys(c, c->argv + 1, 1, timeout, c->argv[2]); From 554a5dd2fc708d0985fecf69b87e167707691c32 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 31 Jan 2011 16:50:17 +0100 Subject: [PATCH 2/2] Clarify comment --- src/t_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_list.c b/src/t_list.c index c9ec2e67..9e659092 100644 --- a/src/t_list.c +++ b/src/t_list.c @@ -826,7 +826,7 @@ int handleClientsWaitingListPush(redisClient *c, robj *key, robj *ele) { addReplyBulk(receiver,ele); return 1; } else { - /* BRPOPLPUSH */ + /* BRPOPLPUSH, note that receiver->db is always equal to c->db. */ dstobj = lookupKeyWrite(receiver->db,dstkey); if (dstobj && checkType(receiver,dstobj,REDIS_LIST)) { decrRefCount(dstkey);