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

Can't get example to exit successfully #335

Closed
dstitt opened this issue Jun 16, 2016 · 1 comment
Closed

Can't get example to exit successfully #335

dstitt opened this issue Jun 16, 2016 · 1 comment

Comments

@dstitt
Copy link

dstitt commented Jun 16, 2016

This simple script never exits (nodejs on linux). I'd expect it to, the equivalent script python certainly does. I think its due to the ioredis module hanging around and not unref'ing itself.

any clues? I'm basically stuck.

var Redis = require("ioredis");
var redis = new Redis();

redis.set("foo","bar"); 
redis.incr("nextid");

redis.get("nextid", function (err, result) { 
  console.log(result);
});
@luin
Copy link
Collaborator

luin commented Jun 16, 2016

Yes, that's because the connection is still active. Calling redis.disconnect() or process.exit() should exit the program.

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

2 participants