-
Notifications
You must be signed in to change notification settings - Fork 7
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
Send periodic PINGs to the server to detect ping timeout #63
Comments
@nyuszika7h could you post the crash logs, maybe a short reproduction log (including ircd information and what you did to produce the crash)? I haven't had problems with any ircds yet. |
I was going to work on this, then I realised we have a way of detecteting that we've disconnected: The socket closes/ends. Why it wouldn't close the socket when we're disconnected intrigues me. Can this be consistently reproduced? |
@omnidan There is no "crash log", as the bot simply stays running, unless something makes it write to the socket. @michealharker This is not an issue with coffea in particular, it's just how TCP works. If the server doesn't send a TCP RST for whatever reason, the client won't know it's disconnected unless it tries to send data. I can give you a way to reproduce it, though, as a few days ago I discovered that Undernet's ircd does not send any feedback at all on See also: http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html Note that the default configuration of the Linux kernel's keepalive is insufficient, as it will only disconnect after about 10 hours (I can't find the exact StackOverflow post now). So you need to do keepalive manually. |
Closing this here for now. This should be considered in |
If the bot disconnects uncleanly (e.g. ping timeout), it might not notice it, and if it isn't writing to the socket, chances are it will never notice it. As soon as it tries to write to the socket, it would get a "Broken pipe" error.
To avoid this issue, coffea should send periodic keepalive
PING
s to the server. (The interval should be probably configurable.)The text was updated successfully, but these errors were encountered: