Skip to content

Commit

Permalink
Reject with general error in Redis#connect
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerhut committed Aug 4, 2016
1 parent f1cadff commit b68887a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b68887a

Please sign in to comment.