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

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

commit 41d5d3a9ef5f6c90b0bff1a6e5f785841c11c15b
Author: 邹异雄 <yixiong...@tuputech.com>
AuthorDate: Fri Jan 4 20:30:14 2019 +0800

    Fix: do not reconnect if connection.destroyed, prevent connection leak
---
 lib/nodejs/lib/thrift/connection.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/nodejs/lib/thrift/connection.js 
b/lib/nodejs/lib/thrift/connection.js
index b545454..06481db 100644
--- a/lib/nodejs/lib/thrift/connection.js
+++ b/lib/nodejs/lib/thrift/connection.js
@@ -221,6 +221,10 @@ Connection.prototype.connection_gone = function () {
   });
 
   this.retry_timer = setTimeout(function () {
+    if (self.connection.destroyed) {
+        return;
+    }
+
     log.debug("Retrying connection...");
 
     self.retry_totaltime += self.retry_delay;

Reply via email to