Skip to content

Commit c7dbfec

Browse files
author
linkangzhen
committed
prototype.end move on("error", to outsite
1 parent 1c983a1 commit c7dbfec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,12 +909,12 @@ RedisClient.prototype.pub_sub_command = function (command_obj) {
909909
RedisClient.prototype.end = function () {
910910
this.stream._events = {};
911911

912+
//clear retry_timer
912913
if(this.retry_timer){
913914
clearTimeout(this.retry_timer);
914915
this.retry_timer=null;
915-
this.stream.on("error", function(){
916-
});
917916
}
917+
this.stream.on("error", function(){});
918918

919919
this.connected = false;
920920
this.ready = false;

0 commit comments

Comments
 (0)