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

bug: reconnecting fails if the client was instantiated with server names without ports appended #349

Open
htbvo opened this issue Jul 10, 2019 · 0 comments

Comments

@htbvo
Copy link

htbvo commented Jul 10, 2019

There is a bug in how server addresses are passed to the issue log on a connection error. Consider the case when the client is instantiated like so:

const client = new Memcached(['server-0.memcached.local', 'server-0.memcached.local'])

If the first attempt to connect to server-0 fails, then an issue is created for the address server-0.memcached.local:11211.
If the second attempt to connect to server-0 fails, then an issue is created for the address server-0.memcached.local.

The reconnects attempts for the second issue will never pass, since it's eventually going to call ping([server-0.memcached.local][1]) in connection.js.

All subsequent requests that get mapped to server-0 will see that it's unavailable, even if reconnect attempts spawned from first the connection issue for the first failure (server-0.memcached.local:11211) succeeded.

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

1 participant