1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Partial fix for null multi bulk response.

This commit is contained in:
Paul Carey
2010-11-10 14:07:47 +00:00
committed by Matt Ranney
parent 1eb3f6a1aa
commit 5bddbe3d9a
2 changed files with 30 additions and 16 deletions

View File

@@ -784,6 +784,7 @@ Multi.prototype.exec = function (callback) {
var i, il, j, jl, reply, args, obj, key, val;
if (replies) {
for (i = 1, il = self.queue.length; i < il; i += 1) {
reply = replies[i - 1];
args = self.queue[i];
@@ -803,6 +804,7 @@ Multi.prototype.exec = function (callback) {
args[args.length - 1](null, reply);
}
}
}
if (callback) {
callback(null, replies);

12
test.js
View File

@@ -204,6 +204,18 @@ tests.MULTI_6 = function () {
});
};
tests.WATCH_MULTI = function () {
var name = 'WATCH_MULTI';
client.watch(name);
var multi = client.multi();
multi.incr(name);
client.incr(name);
multi.exec(function (err, replies) {
next(name);
});
};
tests.HSET = function () {
var key = "test hash",
field1 = new Buffer("0123456789"),