-
Notifications
You must be signed in to change notification settings - Fork 421
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
disconnect does not appear to send the reason to the server #89
Comments
For me the disconnect doesn't do anything other than call the callback. I tried doing |
Occasionally, the quit message does come out, so it looks like it's actually disconnecting the connection without actually waiting to make sure that the quit command has happened. |
Hmmm, it seems to be working for me every time. Perhaps it's over lower latency links or something. Are you still experiencing this problem?, What IRC server are you seeing the issue on? |
I've only used it on Freenode, from webOS TouchPads running node 0.4.. |
I have the following code for quitting. I'm running the bot on IRCNet on a local operator's server. process.stdin.resume();
process.on('SIGINT', function () {
console.log('%s received SIGINT', network.name.green);
network.disconnect('SIGINT', function () {
console.log('We have now quit from', network.name.green);
setTimeout(function () { console.log('Still quit.'); }, 1000);
});
}); What I get:
And on IRC: I added the timeout to make sure that Node doesn't exit too soon, but it didn't make any difference. Edit: Using node 0.7.0 currently. Edit2: Tried with 0.7.12, no change. |
I have found the root cause. If you use flood protection the send is queued in |
👍 please fix this. I've made a dirty hack to overcome this problem but it's just that - a hack. |
Is disabling flood protection the best workaround for this atm? |
Calling disconnect("user pressed disconnect button") gives me a quit message of "Client Quit". Either it's not sending the message with the QUIT command, or it's just flat disconnecting before sending..
The text was updated successfully, but these errors were encountered: