You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Fix parsing mb nil in nested multi-bulk reply.
This commit is contained in:
3
index.js
3
index.js
@@ -253,7 +253,8 @@ RedisReplyParser.prototype.send_reply = function (reply) {
|
|||||||
RedisReplyParser.prototype.add_multi_bulk_reply = function (reply) {
|
RedisReplyParser.prototype.add_multi_bulk_reply = function (reply) {
|
||||||
if (this.multi_bulk_replies) {
|
if (this.multi_bulk_replies) {
|
||||||
this.multi_bulk_replies.push(reply);
|
this.multi_bulk_replies.push(reply);
|
||||||
if (this.multi_bulk_replies.length !== this.multi_bulk_length) {
|
// use "less than" here because a nil mb reply claims "0 length", but we need 1 slot to hold it
|
||||||
|
if (this.multi_bulk_replies.length < this.multi_bulk_length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user