summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Jian Ping <wujp@greatld.com>2021-12-02 18:06:01 +0800
committerJens Geyer <Jens-G@users.noreply.github.com>2022-10-25 22:36:49 +0200
commit22aa3e52860fb7c2248af99715b9235ca4723af0 (patch)
tree73b6932e1ba28fad581edc6bae1a4d200005c0ce
parent8940715a1b8c2808cd2654687552dbbda3509efa (diff)
downloadthrift-22aa3e52860fb7c2248af99715b9235ca4723af0.tar.gz
clear retry timer first then emit close event
-rw-r--r--lib/nodejs/lib/thrift/connection.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nodejs/lib/thrift/connection.js b/lib/nodejs/lib/thrift/connection.js
index 5faa24c9f..b4e5a0527 100644
--- a/lib/nodejs/lib/thrift/connection.js
+++ b/lib/nodejs/lib/thrift/connection.js
@@ -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;
}