From 6a44331acd11b7bd547e0feb1a50e454c4b72555 Mon Sep 17 00:00:00 2001 From: Matt Ranney Date: Sun, 13 Nov 2011 20:19:34 -1000 Subject: [PATCH] Fix this/self reference on db re-select. --- index.js | 4 ++-- tests/test_start_stop.js | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 tests/test_start_stop.js 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(); -// }); -