Skip to content

Commit

Permalink
Deprecate end() by having it call quit() instead. Marked for eventual…
Browse files Browse the repository at this point in the history
… removal. Fixes redis#419
  • Loading branch information
brycebaril committed Apr 27, 2013
1 parent 9d14970 commit a8ee9cd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,12 +855,14 @@ RedisClient.prototype.pub_sub_command = function (command_obj) {
}
};

// Warning! end() has been deprecated and will go away
// in later versions of this client. Please consider switching to
// quit() everywhere you use end.
RedisClient.prototype.end = function () {
this.stream._events = {};
this.connected = false;
this.ready = false;
this.closing = true;
return this.stream.end();
if (exports.debug_mode) {
console.log("Using deprecated .end() method!");
}
return this.quit();
};

function Multi(client, args) {
Expand Down

0 comments on commit a8ee9cd

Please sign in to comment.