commit | 22aa3e52860fb7c2248af99715b9235ca4723af0 | [log] [tgz] |
---|---|---|
author | Wu Jian Ping <wujp@greatld.com> | Thu Dec 02 18:06:01 2021 +0800 |
committer | Jens Geyer <Jens-G@users.noreply.github.com> | Tue Oct 25 22:36:49 2022 +0200 |
tree | 73b6932e1ba28fad581edc6bae1a4d200005c0ce | |
parent | 8940715a1b8c2808cd2654687552dbbda3509efa [diff] |
clear retry timer first then emit close event
diff --git a/lib/nodejs/lib/thrift/connection.js b/lib/nodejs/lib/thrift/connection.js index 5faa24c..b4e5a05 100644 --- a/lib/nodejs/lib/thrift/connection.js +++ b/lib/nodejs/lib/thrift/connection.js
@@ -202,11 +202,11 @@ // 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; }