[
https://issues.apache.org/jira/browse/THRIFT-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15240268#comment-15240268
]
ASF GitHub Bot commented on THRIFT-3787:
----------------------------------------
Github user jamesreggio commented on a diff in the pull request:
https://github.com/apache/thrift/pull/986#discussion_r59645316
--- Diff: lib/nodejs/lib/thrift/connection.js ---
@@ -181,19 +173,18 @@ Connection.prototype.write = function(data) {
Connection.prototype.connection_gone = function () {
var self = this;
+ this.connected = false;
// If a retry is already in progress, just let that happen
if (this.retry_timer) {
return;
}
- if (!this.max_attempts) {
+ // We cannot reconnect a secure socket.
+ if (!this.max_attempts || this.ssl) {
self.emit("close");
return;
}
- this.connected = false;
--- End diff --
Prior to this change, this would not be run if `this.max_attempts` was
unset.
> Node.js Connection object doesn't handle errors correctly
> ---------------------------------------------------------
>
> Key: THRIFT-3787
> URL: https://issues.apache.org/jira/browse/THRIFT-3787
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Library
> Reporter: James Reggio
> Priority: Minor
>
> There are a handful of operation-ordering problems in the
> Connection.prototype.connection_gone() method and its friends.
> See the pull request for more details.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)