Skip to content

Conversation

@jaunis
Copy link

@jaunis jaunis commented Jun 20, 2016

Hello,

I ran into an issue in which a 'close' and an 'error' event are fired simultaneously. Thus, 2 re-connections are launched at the same time, and the second removes the listeners positioned on the socket by the first one.
This causes errors raised by the newly created socket not to be caught.

In this pull request, I fix this issue by rejecting a reconnection request if another one is pending.

I also fix the exponential reconnection interval : it is now limited to five times the initial interval.

Regards

@jaunis jaunis changed the title Fix simultaneous reconnection handling Fix simultaneous reconnection handling and exponential reconnection interval Sep 12, 2016
@andrew-aladev andrew-aladev mentioned this pull request Oct 10, 2016
@andrew-aladev
Copy link

Please add a comment about Sigmoid function you used.

@andrew-aladev
Copy link

andrew-aladev commented Oct 10, 2016

Please use retry.pending or something similar instead of instance variable. It looks like @nucleardreamer is designed retry object for such usage.

- Move attribute pendingReconnect to the retry object
@jaunis
Copy link
Author

jaunis commented Oct 11, 2016

@andrew-aladev It's done

@nucleardreamer
Copy link
Member

Thanks for the commit @jaunis, and sorry about the radio silence. I will be able to review this later today

Jean Aunis added 3 commits November 4, 2016 09:35
- timeout is given in seconds
- additional security to avoid launching several reconnections simultaneously
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

Successfully merging this pull request may close these issues.

3 participants