Skip to content

Commit 19c918d

Browse files
committed
Revert "Deprecate end() by having it call quit() instead. Marked for eventual removal. Fixes redis#419"
A hard client-side quit is useful for test purposes, and some other rare use cases. This reverts commit a8ee9cd.
1 parent 747cd1f commit 19c918d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -857,14 +857,12 @@ RedisClient.prototype.pub_sub_command = function (command_obj) {
857857
}
858858
};
859859

860-
// Warning! end() has been deprecated and will go away
861-
// in later versions of this client. Please consider switching to
862-
// quit() everywhere you use end.
863860
RedisClient.prototype.end = function () {
864-
if (exports.debug_mode) {
865-
console.log("Using deprecated .end() method!");
866-
}
867-
return this.quit();
861+
this.stream._events = {};
862+
this.connected = false;
863+
this.ready = false;
864+
this.closing = true;
865+
return this.stream.end();
868866
};
869867

870868
function Multi(client, args) {

0 commit comments

Comments
 (0)