diff options
author | Wu Jian Ping <wujp@greatld.com> | 2021-12-02 18:06:01 +0800 |
---|---|---|
committer | Jens Geyer <Jens-G@users.noreply.github.com> | 2022-10-25 22:36:49 +0200 |
commit | 22aa3e52860fb7c2248af99715b9235ca4723af0 (patch) | |
tree | 73b6932e1ba28fad581edc6bae1a4d200005c0ce | |
parent | 8940715a1b8c2808cd2654687552dbbda3509efa (diff) | |
download | thrift-22aa3e52860fb7c2248af99715b9235ca4723af0.tar.gz |
clear retry timer first then emit close event
-rw-r--r-- | lib/nodejs/lib/thrift/connection.js | 2 |
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; } |