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

Emit errors if the connection timeout / maximum retry attempts have been exceeded

Accept setting max_attempts to zero.
The reconnection event is now emitted when trying to reconnect instead of earlier.
The connection timeout is now going to trigger once after exceeding the maximum timeout instead of stopping earlier.
This commit is contained in:
Ruben Bridgewater
2015-09-10 18:00:57 +02:00
parent f2ee8dbc9e
commit 1e0421ac3b
3 changed files with 23 additions and 22 deletions

View File

@@ -687,7 +687,7 @@ describe("The node_redis client", function () {
describe('true', function () {
it("does not return an error and enqueues operation", function (done) {
var client = redis.createClient(9999, null, {
max_attempts: 1,
max_attempts: 0,
parser: parser
});
@@ -715,7 +715,7 @@ describe("The node_redis client", function () {
it("does not emit an error and enqueues operation", function (done) {
var client = redis.createClient(9999, null, {
parser: parser,
max_attempts: 1,
max_attempts: 0,
enable_offline_queue: false
});