Skip to content

Commit

Permalink
fixed redis quit,we call client.end(),remove "error" event listener,t…
Browse files Browse the repository at this point in the history
…he retry_timer try to connect;when there is a "error" exception,the process will exit
  • Loading branch information
linkangzhen committed May 27, 2014
1 parent c68b3f7 commit 1c983a1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,14 @@ RedisClient.prototype.pub_sub_command = function (command_obj) {

RedisClient.prototype.end = function () {
this.stream._events = {};

if(this.retry_timer){
clearTimeout(this.retry_timer);
this.retry_timer=null;
this.stream.on("error", function(){
});
}

this.connected = false;
this.ready = false;
this.closing = true;
Expand Down

0 comments on commit 1c983a1

Please sign in to comment.