Skip to content

Commit 8f7a436

Browse files
Gerhutluin
authored andcommitted
fix: reject with general error in Redis#connect (#354)
1 parent f1cadff commit 8f7a436

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/redis.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ Redis.prototype.connect = function (callback) {
299299
_this.removeListener('close', connectionCloseHandler);
300300
resolve();
301301
};
302-
var connectionCloseHandler = function (err) {
302+
var connectionCloseHandler = function () {
303303
_this.removeListener(CONNECT_EVENT, connectionConnectHandler);
304-
reject(err);
304+
reject(new Error(utils.CONNECTION_CLISED_ERROR_MSG));
305305
};
306306
_this.once(CONNECT_EVENT, connectionConnectHandler);
307307
_this.once('close', connectionCloseHandler);

0 commit comments

Comments
 (0)