Skip to content

Commit

Permalink
Merge pull request #157 from ColmHally/master
Browse files Browse the repository at this point in the history
Update options host & port with resolved Redis server
  • Loading branch information
luin committed Sep 30, 2015
2 parents d79913c + 3c1c381 commit 5e3ba24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ Redis.prototype.parseOptions = function () {
* @private
*/
Redis.prototype.setStatus = function (status, arg) {
debug('status[%s]: %s -> %s', (this.options.path ? this.options.path : (this.options.host + ':' + this.options.port)), this.status || '[empty]', status);
var remoteHost = this.stream && this.stream.remoteAddress || this.options.host;
var remotePort = this.stream && this.stream.remotePort || this.options.port;
debug('status[%s:%s]: %s -> %s', remoteHost, remotePort, this.status || '[empty]', status);
this.status = status;
process.nextTick(this.emit.bind(this, status, arg));
};
Expand Down

0 comments on commit 5e3ba24

Please sign in to comment.