This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
why close does not exit? #26
Comments
i can reproduce, investigating |
nsq.js doesn't queue ops when the connection isn't ready yet, thus listen to the var nsq = require('nsq.js');
var writer = nsq.writer('10.10.133.80:4150');
writer.once('ready', function(){
writer.publish('urlitems', "www.sina.com.cn");
console.log("ok.");
writer.close();
}); |
thanks. document it in the readme is better. |
@visionmedia what's your plan for this? |
probably just leave it as-is for now (with docs), maybe buffer some day but if a connection goes down and we buffer our latency could be pretty awful, almost better to just respond with an error until things are fine, or we could have a bunch of timeouts etc but that would probably be over-engineering for now |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
when i run it, the command do not exit, why?
The text was updated successfully, but these errors were encountered: