Comparing version 1.3.2 to 1.3.3
@@ -5,2 +5,6 @@ ## Changelog | ||
### v1.3.3 - May 19, 2015 | ||
* Fix possible memory leak warning. | ||
### v1.3.2 - May 18, 2015 | ||
@@ -7,0 +11,0 @@ |
@@ -245,3 +245,2 @@ 'use strict'; | ||
stream.setTimeout(0); | ||
_this.manuallyClosing = true; | ||
stream.destroy(); | ||
@@ -254,12 +253,12 @@ }); | ||
var connectionReadyHandler = function () { | ||
_this.removeListener('end', connectionEndHandler); | ||
var connectionConnectHandler = function () { | ||
_this.removeListener('close', connectionCloseHandler); | ||
resolve(); | ||
}; | ||
var connectionEndHandler = function (err) { | ||
_this.removeListener('ready', connectionReadyHandler); | ||
var connectionCloseHandler = function (err) { | ||
_this.removeListener('connect', connectionConnectHandler); | ||
reject(err); | ||
}; | ||
_this.once('ready', connectionReadyHandler); | ||
_this.once('end', connectionEndHandler); | ||
_this.once('connect', connectionConnectHandler); | ||
_this.once('close', connectionCloseHandler); | ||
}); | ||
@@ -266,0 +265,0 @@ }.bind(this)).nodeify(callback); |
{ | ||
"name": "ioredis", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "A delightful, performance-focused Redis client for Node and io.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -520,3 +520,3 @@ # ioredis | ||
command to another node. This option limits the max redirections allowed when sending a command. The default value is `16`. | ||
* `retryDelayOnFailover`: When the error of "Connection is closed." is received when sending a command, | ||
* `retryDelayOnFailover`: If the error of "Connection is closed." is received when sending a command, | ||
ioredis will retry after the specified delay. The default value is `2000`. You should make sure to let `retryDelayOnFailover * maxRedirections > cluster-node-timeout` | ||
@@ -523,0 +523,0 @@ in order to insure that no command will fails during a failover. |
@@ -47,3 +47,6 @@ 'use strict'; | ||
it('should close the connection when timeout', function (done) { | ||
var redis = new Redis(6379, '192.0.0.0', { connectTimeout: 1 }); | ||
var redis = new Redis(6379, '192.0.0.0', { | ||
connectTimeout: 1, | ||
retryStrategy: null | ||
}); | ||
redis.get('foo', function (err) { | ||
@@ -50,0 +53,0 @@ expect(err.message).to.match(/Connection is closed/); |
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
256285
6827