Skip to content

client.duplicate(options) with options.db does not work #1281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
peecky opened this issue Oct 26, 2017 · 1 comment · Fixed by #1311
Closed

client.duplicate(options) with options.db does not work #1281

peecky opened this issue Oct 26, 2017 · 1 comment · Fixed by #1311
Labels

Comments

@peecky
Copy link

peecky commented Oct 26, 2017

  • Version: node_redis: 2.8.0, redis-server: 3.2.9
  • Platform: Node.js 6.11.1
  • Description: When duplicating a client object via existing one with different DB option, the new one's DB is same to previous one's DB.
const redis = require('redis');
const redis1 = redis.createClient({ db: 1 }); // use DB 1. OK
const redis2 = redis1.duplicate({ db: 2 }); // use DB 1, not DB 2

I think that this code line is related to this issue.
https://github.com/NodeRedis/node_redis/blob/009479537eb920d2c34045026a55d31febd1edd7/lib/extendedApi.js#L98

@stockholmux stockholmux added the Bug label Nov 1, 2017
@stockholmux
Copy link
Contributor

Confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants