X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=87f1484a7b9beb2ab6cb9c650bda9acaa2ff33ee;hp=e0d4fa6eb90a771854e7cf4612230323d4ae21db;hb=2cf99193317f0c970422f6be61ac6efa658b0006;hpb=d39da7e4336117bc7a87056dd7159a6e0ee1767c diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index e0d4fa6e..87f1484a 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -44,7 +44,6 @@ CoreNetwork::CoreNetwork(const NetworkId &networkid, CoreSession *session) _requestedUserModes('-') { _autoReconnectTimer.setSingleShot(true); - _socketCloseTimer.setSingleShot(true); connect(&_socketCloseTimer, SIGNAL(timeout()), this, SLOT(socketCloseTimeout())); setPingInterval(networkConfig()->pingInterval()); @@ -183,6 +182,8 @@ void CoreNetwork::connectToIrc(bool reconnecting) socket.setProxy(QNetworkProxy::NoProxy); } + enablePingTimeout(); + #ifdef HAVE_SSL socket.setProtocol((QSsl::SslProtocol)server.sslVersion); if (server.useSsl) { @@ -447,8 +448,6 @@ void CoreNetwork::socketInitialized() emit socketInitialized(identity, localAddress(), localPort(), peerAddress(), peerPort()); - enablePingTimeout(); - // TokenBucket to avoid sending too much at once _messageDelay = 2200; // this seems to be a safe value (2.2 seconds delay) _burstSize = 5;