{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/4765bd9e861fbe7308126c1e2d216912?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4765bd9e861fbe7308126c1e2d216912","url":"https://api.github.com/users/mstap","login":"mstap","id":55506},"assignee":null,"updated_at":"2011-11-15T20:48:45Z","labels":[],"closed_at":null,"comments":0,"url":"https://api.github.com/repos/fluffle/goirc/issues/9","body":"In issue #5, a default timeout of 5 minutes was introduced. The comment stated that there should be a PING within 5 minutes anyway. While it is probably true that most IRC servers are configured with a pingfreq of some value less than 5 minutes, this does not mean that there actually is a PING within 5 minutes:\r\n\r\nAt least with Unreal3.2.8.1, a ping will be sent after $pingfreq seconds of **inactivity**. I run a goirc bot on a server where pingfreq is 260. When the goirc bot posts a line, the server will register this is activity. Therefore, for 260 seconds, no PING will be sent. However, since this was a write and not a read, and the IRC connection is otherwise absolutely quiet, goirc will eventually run into a timeout, close the connection (the IRC server says \"Client exited\"), signal the error \"irc.recv(): read tcp 127.0.0.1:6667: resource temporarily unavailable\" and reconnect (due to my code). I can reliably reproduce this every time.\r\n\r\nTherefore, I propose goirc sending a PING request to the server every 250 seconds (or whatever value you think is sufficient) to make the timeout not lead to a disconnect in situations like the one I described above. Unfortunately, I’m not very familiar with neither Go nor goirc’s code structure, otherwise I would have sent a pull request.\r\n\r\nThanks!","html_url":"https://github.com/fluffle/goirc/issues/9","title":"goirc disconnects (actively) after 5 minutes of inactivity","number":9,"id":2249094,"created_at":"2011-11-15T20:48:45Z"},"action":"opened"}