You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fixed redis quit,we call client.end(),remove "error" event listener,the retry_timer try to connect;when there is a "error" exception,the process will exit
This commit is contained in:
8
index.js
8
index.js
@@ -908,6 +908,14 @@ RedisClient.prototype.pub_sub_command = function (command_obj) {
|
|||||||
|
|
||||||
RedisClient.prototype.end = function () {
|
RedisClient.prototype.end = function () {
|
||||||
this.stream._events = {};
|
this.stream._events = {};
|
||||||
|
|
||||||
|
if(this.retry_timer){
|
||||||
|
clearTimeout(this.retry_timer);
|
||||||
|
this.retry_timer=null;
|
||||||
|
this.stream.on("error", function(){
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
this.ready = false;
|
this.ready = false;
|
||||||
this.closing = true;
|
this.closing = true;
|
||||||
|
Reference in New Issue
Block a user