Skip to content

connect with reconnectInterval creates exponential retries #26

Description

@nvkets

If a connection is made with the reconnectionInterval option set, an issue arises when the CasparCG service is not available:

timeout is called on 'connectionError' and on 'disconnected', creating 2 timeouts to retry reconnect.

these number of retries keep on growing, since every timeout creates 2 new timeouts.

Proposed solution: only set reconnect timeout on connectionError OR disconnect?

image

Activity

  1. saltomodules commented on May 11, 2017

    @saltomodules

    I can confirm that this issue is also present in the caspar-cg system we are running. When casparcg goes down for a longer period of time node-caspar-cg will keep making two connection attempts at every time-out resulting in a doubling of connections every iteration.

    Eventually the process depending on node-caspar-cg will run out of memory and crash, or when casparcg comes back on the air it suddenly receives hundreds of incoming connections.

    Would be great if tkupari's pull request could be merged because it seems to be an adequate solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions