Comparing version 1.5.2 to 1.5.3
@@ -5,2 +5,6 @@ ## Changelog | ||
### v1.5.3 - June 24, 2015 | ||
* Fix sometimes monitor leads command queue error. | ||
### v1.5.2 - June 24, 2015 | ||
@@ -7,0 +11,0 @@ |
@@ -105,16 +105,15 @@ 'use strict'; | ||
if (self.options.monitor) { | ||
self.call('monitor', function () { | ||
var sendCommand = self.sendCommand; | ||
self.sendCommand = function (command) { | ||
if (_.includes(Command.FLAGS.VALID_IN_MONITOR_MODE, command.name)) { | ||
return sendCommand.call(self, command); | ||
} | ||
command.reject(new Error('Connection is in monitoring mode, can\'t process commands.')); | ||
return command.promise; | ||
}; | ||
self.once('close', function () { | ||
delete self.sendCommand; | ||
}); | ||
self.setStatus('monitoring'); | ||
self.call('monitor'); | ||
var sendCommand = self.sendCommand; | ||
self.sendCommand = function (command) { | ||
if (_.includes(Command.FLAGS.VALID_IN_MONITOR_MODE, command.name)) { | ||
return sendCommand.call(self, command); | ||
} | ||
command.reject(new Error('Connection is in monitoring mode, can\'t process commands.')); | ||
return command.promise; | ||
}; | ||
self.once('close', function () { | ||
delete self.sendCommand; | ||
}); | ||
self.setStatus('monitoring'); | ||
} else { | ||
@@ -121,0 +120,0 @@ var item; |
@@ -125,3 +125,3 @@ 'use strict'; | ||
if (!item) { | ||
return this.emit('error', new Error('Command queue state error. If you can reproduce this, please report it.')); | ||
return this.emit('error', new Error('Command queue state error. If you can reproduce this, please report it.' + reply.toString())); | ||
} | ||
@@ -128,0 +128,0 @@ if (_.includes(Command.FLAGS.ENTER_SUBSCRIBER_MODE, item.command.name)) { |
{ | ||
"name": "ioredis", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "A delightful, performance-focused Redis client for Node and io.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -793,2 +793,3 @@ 'use strict'; | ||
expect(setReadOnlyNode1 || setReadOnlyNode2 || setReadOnlyNode3).to.eql(true); | ||
cluster.disconnect(); | ||
disconnect([node1, node2, node3], done); | ||
@@ -795,0 +796,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
271533