Right now, Idle sends out PINGs every 30 seconds, but doesn't do anything if the server doesn't answer them. This is … not great. If the connection has died for some reason—maybe you had both wired and wireless, Idle connected over the wire, and then you unplugged the cable? This happens to me every single day—Idle really ought to notice and disconnect. So here's a branch which does that. It also fixes the force-disconnect path if you try to explicitly Disconnect() on such a connection to not wait forever for the TCP connection to close cleanly.
+ if (seconds_since_ping > priv->keepalive_interval * MISSED_KEEPALIVES_BEFORE_DISCONNECTING) { I personally love as many brackets as possible to make everything clear. Otherwise looks great! What a nice easy branch to review, thanks!
(In reply to comment #1) > + if (seconds_since_ping > priv->keepalive_interval * > MISSED_KEEPALIVES_BEFORE_DISCONNECTING) { > > I personally love as many brackets as possible to make everything clear. I think http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=c679fe4baaec1c29f7d0fbbed1f6b1d9c7d1266c may be clearer, too? > Otherwise looks great! What a nice easy branch to review, thanks! Consider it merged: http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=27c1ffc5ebcfcb37ad958ef451ca2772bdc4ec01
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.