From 669f302e16188342041db4b671aa4cc7ea05ba50 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 4416d6fd..f94fb425 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 bbaf76ea2f8124f3e68ba4a2558695630a502e03 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 f94fb425..47c927db 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);