Skip to content

Commit

Permalink
fix: reject with general error in Redis#connect (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerhut authored and luin committed Aug 8, 2016
1 parent f1cadff commit 8f7a436
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

2 comments on commit 8f7a436

@ehynds
Copy link

@ehynds ehynds commented on 8f7a436 Aug 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that be CONNECTION_CLOSED_ERROR_MSG?

@shaharmor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thnx, will be fixed soon

Please sign in to comment.