1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Fixed the pub/sub logic accidentally stringing the first value of a multi/exec response

This commit is contained in:
Raymond Myers
2015-04-01 00:10:23 -07:00
committed by Ray Myers
parent 6f1acb0678
commit f384d1c774

View File

@@ -648,7 +648,7 @@ RedisClient.prototype.return_reply = function (reply) {
// If the "reply" here is actually a message received asynchronously due to a
// pubsub subscription, don't pop the command queue as we'll only be consuming
// the head command prematurely.
if (Array.isArray(reply) && reply.length > 0 && reply[0]) {
if (this.pub_sub_mode && Array.isArray(reply) && reply.length > 0 && reply[0]) {
type = reply[0].toString();
}