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

Cluster client rejects ports > 55535 #22

Open
fishy opened this issue Jun 3, 2022 · 0 comments
Open

Cluster client rejects ports > 55535 #22

fishy opened this issue Jun 3, 2022 · 0 comments

Comments

@fishy
Copy link

fishy commented Jun 3, 2022

Currently there's a logic in cluster client that if the redis port > 55535 it will just fail:

if !ok || !ok2 || port <= 0 || port+10000 > 65535 {

I don't see any comment explaining why. This is currently causing us problems when we use miniredis in unit tests. Miniredis by default just bind to 127.0.0.1:0 and let the OS assign an available port to it, and if the OS assigns a port that's in the range of (55535, 65535], the cluster client will just refuse to connect to it and fail the unit test.

This seems to be more frequent on mac than linux (maybe mac tend to assign higher ports in this case?), which makes the unit tests more flaky on macs in our case.

Is there a good reason for this restriction? If not, can we remove it?

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