Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2058

Add reconnect support to node.js library

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.2
    • Component/s: Node.js - Library
    • Labels:
    • Patch Info:
      Patch Available

      Description

      I've added reconnect support to node.js library.

      added 4 new parameters to options:

      debug : (true or false) when true console.log reconnect events
      max_attempts : max number of reconnect attempts before giving up
      connect_timeout : max time before giving up reconnect attempts
      retry_max_delay : max time in millisecond between retry attempts
      

      also added two new functions :

      initialize_retry_vars() initialize the retry variables. 
      connection_gone() gets called on 'close' event and tries to reconnect the connection.

      Update: updated the patch to re-enable emitting the 'error' event.
      ("error" events get turned into exceptions if they aren't listened for. If the user handled this error then we should try to reconnect.)

        Attachments

          Activity

            People

            • Assignee:
              henrique Henrique Mendonca
              Reporter:
              madani Hamed Madani
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: