Skip to content

Commit

Permalink
fix: warning when hiredis is specified as parser
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Jan 26, 2017
1 parent c5fefb7 commit f85a44b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ function Redis() {
return new Redis(arguments[0], arguments[1], arguments[2]);
}

this.parseOptions(arguments[0], arguments[1], arguments[2]);

EventEmitter.call(this);
Commander.call(this);

this.parseOptions(arguments[0], arguments[1], arguments[2]);

this.resetCommandQueue();
this.resetOfflineQueue();

Expand Down Expand Up @@ -215,6 +215,9 @@ Redis.prototype.parseOptions = function () {
if (typeof this.options.db === 'string') {
this.options.db = parseInt(this.options.db, 10);
}
if (this.options.parser === 'hiredis') {
console.warn('Hiredis parser is abandoned in ioredis v3.0, and JavaScript parser will be used');
}
};

/**
Expand Down

0 comments on commit f85a44b

Please sign in to comment.