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:47:07 +0000 (23:47 +0100)
commitd8c55414437bfc76f608e44d52903178cdc8f8c8
tree8fe414b9c3189e27bea87da0361df840690de31f
parent9bc82aadc2d4edfa28712908c984b54188de5621
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