Skip to content

Commit 1c983a1

Browse files
author
linkangzhen
committed
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
1 parent c68b3f7 commit 1c983a1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,14 @@ RedisClient.prototype.pub_sub_command = function (command_obj) {
908908

909909
RedisClient.prototype.end = function () {
910910
this.stream._events = {};
911+
912+
if(this.retry_timer){
913+
clearTimeout(this.retry_timer);
914+
this.retry_timer=null;
915+
this.stream.on("error", function(){
916+
});
917+
}
918+
911919
this.connected = false;
912920
this.ready = false;
913921
this.closing = true;

0 commit comments

Comments
 (0)