From 22aa3e52860fb7c2248af99715b9235ca4723af0 Mon Sep 17 00:00:00 2001 From: Wu Jian Ping Date: Thu, 2 Dec 2021 18:06:01 +0800 Subject: clear retry timer first then emit close event --- lib/nodejs/lib/thrift/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; } -- cgit v1.2.1