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

[question] Disconnect from cluster #277

Closed
devnetf opened this issue Apr 5, 2016 · 7 comments
Closed

[question] Disconnect from cluster #277

devnetf opened this issue Apr 5, 2016 · 7 comments
Labels

Comments

@devnetf
Copy link

devnetf commented Apr 5, 2016

Hello,
I have the following test code:
`cluster.get('status').then(function(res){
console.log(res);
console.log(cluster.status);
cluster.disconnect();
});

setInterval(function(){
console.log(cluster.status);
}, 1000);`

After cluster.disconnect(); is called, cluster.status still give me "ready". How should I disconnect from the cluster?

Thanks!

@devnetf
Copy link
Author

devnetf commented Apr 7, 2016

Anyone help please?

@luin
Copy link
Collaborator

luin commented Apr 7, 2016

Sorry I didn't notice this issue. Could you enable the debug mode (DEBUG=ioredis:* node yourapp.js) to see the logs? What ioredis version are you using?

@devnetf
Copy link
Author

devnetf commented Apr 7, 2016

ioredis_log

Here is the debug log. I am using the newest version: "2.0.0-rc1"

Thanks!

@luin
Copy link
Collaborator

luin commented Apr 7, 2016

Thank you for the details. It seems that hosts uco-dev*** are resolved to internal ips 10.149.*.*. Did you create the cluster with the hosts rather than the ips? What about using IP address instead?

@devnetf
Copy link
Author

devnetf commented Apr 7, 2016

Thanks for the quick reply. I am not sure about the cluster setup because it is our system admins who set it up. However, when I change the version to "1.15.1". The exact same code works. Could it be a bug in v2.0.0?

@luin
Copy link
Collaborator

luin commented Apr 7, 2016

Yes, it might be a bug if the code works with v1.15.1. I'll look into it this weekend.

@luin luin added the bug label Apr 9, 2016
luin added a commit that referenced this issue Apr 10, 2016
…hod (#281)

* fix(CLUSTER): fix cluster not disconnected when called disconnect method

Related issue: #277
@luin
Copy link
Collaborator

luin commented Apr 10, 2016

@devnetf This issue should be fixed in v2.0.0-rc2. Feel free to reopen it if the issue still exists. Thank you for the feedback!

@luin luin closed this as completed Apr 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants