From b68887af0bad39e65cd2e81f04143e53006c1275 Mon Sep 17 00:00:00 2001 From: George Chung Date: Thu, 4 Aug 2016 14:50:12 +0800 Subject: [PATCH] Reject with general error in Redis#connect --- lib/redis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redis.js b/lib/redis.js index 40e7b842..66c47af3 100644 --- a/lib/redis.js +++ b/lib/redis.js @@ -299,9 +299,9 @@ Redis.prototype.connect = function (callback) { _this.removeListener('close', connectionCloseHandler); resolve(); }; - var connectionCloseHandler = function (err) { + var connectionCloseHandler = function () { _this.removeListener(CONNECT_EVENT, connectionConnectHandler); - reject(err); + reject(new Error(utils.CONNECTION_CLISED_ERROR_MSG)); }; _this.once(CONNECT_EVENT, connectionConnectHandler); _this.once('close', connectionCloseHandler);