diff --git a/index.js b/index.js index 4caf9749a0..799274d3e9 100644 --- a/index.js +++ b/index.js @@ -118,7 +118,7 @@ RedisReplyParser.prototype.execute = function (incoming_buf) { this.multi_bulk_replies = []; this.state = "type"; if (0 == this.multi_bulk_length) { - this.send_reply([]); + this.send_reply(null); } } else { this.emit("error", new Error("didn't see LF after NL reading multi bulk count")); diff --git a/test.js b/test.js index 954ea8d9f2..bde150656c 100644 --- a/test.js +++ b/test.js @@ -218,7 +218,7 @@ tests.MULTIBULK_ZERO_LENGTH = function () { var name = "MULTIBULK_ZERO_LENGTH"; client.KEYS(['users:*'], function(err, results){ assert.strictEqual(null, err, 'error on empty multibulk reply'); - assert.strictEqual(0, results.length); + assert.strictEqual(null, results); next(name); }); };