This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 22aa3e52860fb7c2248af99715b9235ca4723af0
Author: Wu Jian Ping <[email protected]>
AuthorDate: Thu Dec 2 18:06:01 2021 +0800

    clear retry timer first then emit close event
---
 lib/nodejs/lib/thrift/connection.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
   }
 

Reply via email to