Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect with reconnectInterval creates exponential retries #26

Open
nvkets opened this issue Jun 24, 2016 · 1 comment
Open

connect with reconnectInterval creates exponential retries #26

nvkets opened this issue Jun 24, 2016 · 1 comment

Comments

@nvkets
Copy link

nvkets commented Jun 24, 2016

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

@saltomodules
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants