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

maxFirstConnects to avoid reconnection loop #396

Closed
mcollina opened this issue Apr 12, 2016 · 5 comments
Closed

maxFirstConnects to avoid reconnection loop #396

mcollina opened this issue Apr 12, 2016 · 5 comments

Comments

@mcollina
Copy link
Member

In some cases, we might be stuck in a reconnection loop were we do not expose the internal error to the user. maxFirstConnect  loop should avoid that, so that after X (10) failed attempt to connect for the first time, we give up. Suggested by @jimbojw in #257 (comment)

@5aurabh
Copy link

5aurabh commented Mar 22, 2019

@mcollina I just ran into this issue and am hoping to contribute. Just to get some clarity, should maxFirstConnect be enforced only for the first successful connection or should it be reinforced every time after a successful connection?

Example:
Consider for maxFirstConnect : 0, what would be the desired behaviour if a client is able to successfully connect initially but later on loses connection and tries to reconnect?

@jianfenkezhan
Copy link

So, how to fix it?

@jimbojw
Copy link

jimbojw commented Jul 10, 2019

what would be the desired behaviour if a client is able to successfully connect initially but later on loses connection and tries to reconnect?

@5aurabh In that case, the current behavior (retry indefinitely) would be fine. The proposed maxFirstConnect setting would only apply to the initial connection. Once a connection has been made, later reconnection attempts would proceed as normal.

@YoDaMa
Copy link
Contributor

YoDaMa commented Feb 21, 2020

This could be fixed for ECONNREFUSED via #1053

@YoDaMa
Copy link
Contributor

YoDaMa commented May 1, 2020

while not explicitly handled, this has been released with #1053 to deal with typical TLS level errors. So we will close this feature request issue.

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

No branches or pull requests

5 participants