You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2021/12/01 10:07:15 UTC

[GitHub] [thrift] emmenlau commented on a change in pull request #2407: fix reconnect issue for nodejs

emmenlau commented on a change in pull request #2407:
URL: https://github.com/apache/thrift/pull/2407#discussion_r760031762



##########
File path: lib/nodejs/lib/thrift/connection.js
##########
@@ -198,6 +200,16 @@ Connection.prototype.connection_gone = function () {
   var self = this;
   this.connected = false;
 
+  // If closed by manual, emit close event and cancel reconnect process
+  if(this.forceClose) {
+    self.emit("close");

Review comment:
       This may be overly pedantic, but would it be better to *first* clear the timer and *then* emit close? In other words, move the line `self.emit("close");` down below the `if (this.retry_timer) {` block?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org