You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Fix this/self reference on db re-select.
This commit is contained in:
4
index.js
4
index.js
@@ -166,8 +166,8 @@ RedisClient.prototype.do_auth = function () {
|
||||
}
|
||||
|
||||
// restore the selected db if needed
|
||||
if (this.selected_db !== null) {
|
||||
this.send_command('select', [this.selected_db]);
|
||||
if (self.selected_db !== null) {
|
||||
self.send_command('select', [self.selected_db]);
|
||||
}
|
||||
|
||||
// now we are really connected
|
||||
|
@@ -1,17 +0,0 @@
|
||||
var redis = require("./index"),
|
||||
client = redis.createClient();
|
||||
|
||||
// This currently doesn't work, due to what I beleive to be a bug in redis 2.0.1.
|
||||
// INFO and QUIT are pipelined together, and the socket closes before the INFO
|
||||
// command gets a reply.
|
||||
|
||||
redis.debug_mode = true;
|
||||
client.info(redis.print);
|
||||
client.quit();
|
||||
|
||||
// A workaround is:
|
||||
// client.info(function (err, res) {
|
||||
// console.log(res.toString());
|
||||
// client.quit();
|
||||
// });
|
||||
|
Reference in New Issue
Block a user