[ 
https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15042581#comment-15042581
 ] 

ASF GitHub Bot commented on THRIFT-3060:
----------------------------------------

Github user nsuke commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/395#discussion_r46751947
  
    --- Diff: lib/nodejs/lib/thrift/connection.js ---
    @@ -209,10 +205,9 @@ Connection.prototype.connection_gone = function () {
       this.connected = false;
       this.ready = false;
     
    +  this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff);
    --- End diff --
    
    Is there good reason to change the initial timeout value and also 
`retry_backoff` 1.7 -> 1.5 ?


> Node.js client retry logic doesn't flush offline queue on reconnect
> -------------------------------------------------------------------
>
>                 Key: THRIFT-3060
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3060
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Library
>    Affects Versions: 0.9.2
>            Reporter: Chris Thompson
>            Priority: Minor
>         Attachments: thrift-3060-fix_retry_logic.patch
>
>
> The Node.js client includes retry logic in case the connection terminates 
> unexpectedly.  On reconnect, the `offline_queue` variable never gets reset, 
> so any requests still in the queue will get processed on every reconnect.
> In addition, the variables the keep track of the retry state are not 
> initialized prior to a successful connection, meaning that if the initial 
> connection doesn't succeed, that the retry timer is set to `NaN` and doesn't 
> work as expected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to