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

Fix parser bug after failed EXEC.

This commit is contained in:
Matt Ranney
2010-11-30 11:47:52 -08:00
parent 4815295ed8
commit 79511b4499
5 changed files with 17 additions and 120 deletions

View File

@@ -153,6 +153,7 @@ RedisReplyParser.prototype.execute = function (incoming_buf) {
this.state = "type";
if (this.multi_bulk_length <= 0) {
this.send_reply(null);
this.multi_bulk_length = 0;
}
} else {
this.emit("error", new Error("didn't see LF after NL reading multi bulk count"));
@@ -280,7 +281,7 @@ RedisReplyParser.prototype.add_multi_bulk_reply = function (reply) {
this.multi_bulk_replies = reply;
}
if (this.multi_bulk_nested_length) {
if (this.multi_bulk_nested_length > 0) {
this.multi_bulk_nested_replies.push(this.multi_bulk_replies);
this.multi_bulk_length = 0;
delete this.multi_bulk_replies;