Skip to content

Commit

Permalink
clear retry timer first then emit close event
Browse files Browse the repository at this point in the history
  • Loading branch information
wujjpp authored and Jens-G committed Oct 25, 2022
1 parent 8940715 commit 22aa3e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nodejs/lib/thrift/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ Connection.prototype.connection_gone = function () {

// If closed by manual, emit close event and cancel reconnect process
if(this.forceClose) {
self.emit("close");
if (this.retry_timer) {
clearTimeout(this.retry_timer);
this.retry_timer = null;
}
self.emit("close");
return;
}

Expand Down

0 comments on commit 22aa3e5

Please sign in to comment.