Enable the ping timeout as soon as the connection to IRC is open.
authorMichael Marley <michael@michaelmarley.com>
Wed, 13 Nov 2013 12:03:45 +0000 (07:03 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 19 Nov 2013 22:41:37 +0000 (23:41 +0100)
commit9b8923e3625b5634163b5c164df8fa6a3760f660
tree7a91f600aa0a5f0fdd397585a2c9f5eeeee109ab
parent307cafe026abea9badd8400b8fd594738f0160fe
Enable the ping timeout as soon as the connection to IRC is open.

This fixes the problem where Quassel would get stuck while connecting
if the socket is closed by the server but the core is, for whatever
reason, not notified of this.  This patch works by enabling the ping
timeout as soon as the connection is open, but not actually sending any
PINGs until the IRC authentication is complete.  This will cause the core
to reconnect if at any point it doesn't receive data from the server for
more than the usual ping timeout interval.

Fixes #1249
src/core/corenetwork.cpp
src/core/corenetwork.h