question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IRC connections never times out

See original GitHub issue

Just reported by @MaxLeiter on IRC and isolated on a test server. When the remote server we are connected to just disappears and doesn’t close the connection (server going down, IP gets blackholed, or other network issues), The Lounge stays connected forever and the connection never times out. It still continues to work just as if the connection was working fine, except nothing really gets sent and nothing is coming back in.

Easy way to test on Linux: iptables -A INPUT -s xx.xx.xx.xx -j DROP (iptables -D INPUT 1 to remove, assuming an empty iptables chain) so the client never receives the RST packet. Then wait. The client is permanently stuck waiting for something, with no indication that we are disconnected.

A possible fix could be to automatically close the connection if we didn’t receive a PING request from the server in say, 5 minutes. Another is to periodically send pings to the server ourselves, and kill the connection ourselves if we don’t get a reply in 10-30 seconds (seriously, anything higher is really insane considering it takes 300ms to reach the other side of the world).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
xPawcommented, Apr 15, 2016

Server ping/pong is handled just fine, thus the server knows we’re alive. The suggestion is to send periodic PINGs to the server, so that we can make sure the server is alive.

0reactions
MaxLeitercommented, May 1, 2016

kiwiirc/irc-framework#35 merged 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connection timing out when connecting to an IRC server with ...
I'm trying to connect my PHP script to IRC, but it keeps timing out. I'm on the server, so I know it's up...
Read more >
i cant connect to my server Connection timed out
The problem probably has something to do with network configuration. You should first try connecting from the same machine the IRCd is on...
Read more >
1690415 - IRC Chat stuck on "Connecting..." after a network ...
I have no problem reconnecting using Thunderbird release and beta on Linux. I need to click the "Connect" button in the Instant messaging...
Read more >
Weird "disconnects" (mostly on IRC) - TTLG
My guess would be that the router is rejecting or closing the IRC connection from your computer. Have you tried other IRC clients...
Read more >
Connection to irc server times out after random amount of hours
I'd try the busy channel thing first (assuming there is one that's busy enough). If it works you could maybe start logging packets...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found