diff --git a/index.js b/index.js index b8f1ace8b2..cb7e48f9fd 100644 --- a/index.js +++ b/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 diff --git a/tests/test_start_stop.js b/tests/test_start_stop.js deleted file mode 100644 index 077089331f..0000000000 --- a/tests/test_start_stop.js +++ /dev/null @@ -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(); -// }); -