diff options
author | 邹异雄 <yixiongzou@tuputech.com> | 2019-01-04 20:30:14 +0800 |
---|---|---|
committer | James E. King III <jking@apache.org> | 2019-01-05 01:59:19 -0500 |
commit | 41d5d3a9ef5f6c90b0bff1a6e5f785841c11c15b (patch) | |
tree | fb21389f1bde9942ef0a50ec53964e660f7962d3 /lib/nodejs | |
parent | 414f9a5bf6372844274b0adee7263f4d03ed8e70 (diff) | |
download | thrift-41d5d3a9ef5f6c90b0bff1a6e5f785841c11c15b.tar.gz |
Fix: do not reconnect if connection.destroyed, prevent connection leak
Diffstat (limited to 'lib/nodejs')
-rw-r--r-- | lib/nodejs/lib/thrift/connection.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nodejs/lib/thrift/connection.js b/lib/nodejs/lib/thrift/connection.js index b54545436..06481db78 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; |